tupleof seems to break encapsulation
60rntogo at gmail.com
Fri Sep 4 10:16:47 UTC 2020
Consider the following code.
private int i;
auto x = Foo();
As expected, the commented line does not compile. If I uncomment
it, I get the error "no property i for type foo.Foo". However,
the rest of the code compiles just fine and outputs:
This appears to defeat the purpose of declaring i private. What
am I missing?
More information about the Digitalmars-d-learn