protection for superclass

Frank Benoit keinfarbton at nospam.xyz
Sat May 6 15:31:15 PDT 2006


> Weird, didn't know that that was even legal D.  I guess, after looking at 
> the class spec, that it is, but it's not documented.

The class spec allows protection attribute and if you have no base
class, Object is an implicit base class. This implies, that a protected
inherit encapsulated Object.

> 
> What's more, I can't reproduce it.
> 

If you use the class in the same module, you have always access to every
members. Even the private ones. You can only see this, if you place the
main in a seperate module.




More information about the Digitalmars-d mailing list