Why do private member variables behaved like protected in the same module when creating deriving class?

Neia Neutuladh neia at ikeran.org
Sun Oct 28 16:31:57 UTC 2018


On Sun, 28 Oct 2018 15:47:15 +0000, Stanislav Blinov wrote:
> On Sunday, 28 October 2018 at 15:41:47 UTC, Neia Neutuladh wrote:
> 
>> In D, x is private to C and any types or functions defined in the same
>> module.
> 
> ...and can be accessed via reflection (.tupleof). </Pedantry>

Good point.

I saw a bug report recently implying that this is unintended and subject 
to change, so maybe that won't remain true for long.


More information about the Digitalmars-d mailing list