base class access specifier[s]

Christopher Wright dhasenan at gmail.com
Mon Jan 19 04:21:16 PST 2009


Ellery Newcomer wrote:
> Tee hee. I can make the compiler swallow something silly:
> 
> module silly;
> 
> interface I{
>     void foo();
> }
> 
> class C: public private protected package protected public protected 
> public private protected package I{
>     void foo(){}
> }
> 
> void main(){}

Also, access specifiers on inherited or implemented base types aren't 
honored:
class C : private I {}

C is still implicitly convertible to I.


More information about the Digitalmars-d-learn mailing list