Private Nested Classes?

Vasyl Teliman vasniktel at gmail.com
Sun Mar 31 20:23:55 UTC 2019


On Sunday, 31 March 2019 at 20:07:39 UTC, D Man wrote:
> Is it possible to have private inner nested classes?
>
> For example if I have a class that is only ever used inside 
> another class, it would make sense to be able to 'lock' it 
> inside the outer class, so that raw instances of it cannot be 
> created.
>
> But in this example: https://run.dlang.io/is/PfemUV
>
> The `private` specifier seems to have no meaning.
>
> Is there a way to get the desired effect (make a nested class 
> only accessable from within it's outer class)?

Not sure but this looks like a bug.


More information about the Digitalmars-d mailing list