[dmd-internals] Bug of protected

SHOO zan77137 at nifty.com
Sun Aug 29 03:49:13 PDT 2010


This code doesn't work(r649):

---------
// main.d
import other;

class Foo : OtherModuleClass
{
        override void foo()
        {
                super.foo();
        }
}

void main()
{
        new Foo();
}

-----------
// other.d
class OtherModuleClass
{
        protected void foo()
        {
        }
}
-----------


>dmd main other
main.d(8): Error: class other.OtherModuleClass member foo is not accessible


This bug seem not to be able to call a protected method of super-class
of other modules from derived-class.
Tentatively, I cannot compile DFL.


More information about the dmd-internals mailing list