Why is this legal?

abad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 29 02:50:10 PDT 2017


This works:

class Foo {
     protected void bar() {
         writeln("hello from foo");
     }
}

void main() {
     auto foo = new Foo;
     foo.bar();
}

Is this on purpose and what's the rationale?


More information about the Digitalmars-d-learn mailing list