How high level is D?
Laurent Tréguier
laurent.treguier.sink at gmail.com
Fri Nov 23 08:46:19 UTC 2018
On Friday, 23 November 2018 at 07:26:28 UTC, Paulo Pinto wrote:
>
> Actually that is wrong, it is one PUBLIC class per module.
>
> [...]
>
> Main.java:11: error: _innerDataMember has private access in
> InnerData
> System.out.println("Inner member from outer: " +
> innerData._innerDataMember);
>
> ^
> Main.java:25: error: _mainMember has private access in Main
> System.out.println("Outer member from inner: " +
> main._mainMember);
>
> ^
> Main.java:26: error: _innerDataMember has private access in
> InnerData
> System.out.println("Other class member from same
> level: " + innerData._innerDataMember);
Yes, Neia pointed that out too.
My bad, I never knew about this. It does make `private` slightly
inconsistent instead, since it doesn't behave exactly the same
depending on whether it's in a top-level class or not.
More information about the Digitalmars-d
mailing list