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

Steven Schveighoffer schveiguy at gmail.com
Sat Oct 27 16:19:03 UTC 2018


On 10/27/18 11:24 AM, unprotected-entity wrote:
> On Saturday, 27 October 2018 at 14:20:10 UTC, Steven Schveighoffer wrote:
>>
>> If b didn't have an `x` in it, then how would this work?
>>
> 
> Only in D, does b have x in it.
> 
> In C++, Java and C#, b does *not* have x in it.
> 

This isn't correct. I'd write examples in each of those languages, but 
don't have the time right now.

-Steve


More information about the Digitalmars-d mailing list