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

Stanislav Blinov stanislav.blinov at gmail.com
Sun Oct 28 16:26:33 UTC 2018


On Sunday, 28 October 2018 at 16:20:06 UTC, Jesse Phillips wrote:
> On Sunday, 28 October 2018 at 15:47:15 UTC, 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>
>
> Actually if you try to use it the compiler complains because D 
> reflection is compile time.

Actually it doesn't complain ;)


More information about the Digitalmars-d mailing list