the way how one has to invoke protected base class methods in D seems to be inconsistent. why do i have to use the super keyword ? using the base class name works in case of being public, why is protected any different ?
module Foo;
class Base
{
protected void foo() {}
}
module main;
import Foo;
class Super : Base
{
override protected void foo() {super.foo();} // works
//override void foo() {Base.foo();} // does not work:
//Error: class Foo.Base member foo is not accessible
}
Comment #1 by robert.schadek — 2024-12-13T17:53:13Z