Is this an oop-module bug?

Gheorghe Gabriel knoppy273 at live.com
Mon Nov 26 18:25:11 UTC 2018


--------------- module 1 ---------------
abstract class Base {
     protected final typeof(this) a() { return this; }
     protected final typeof(this) b() { return this; }
}

--------------- module 2 ---------------
final class Class : Base {
     this() {
         a(); // ok
         b(); // ok

         a().b(); // error, b() call is not accessible from this 
module
     }
}


More information about the Digitalmars-d mailing list