package access specifier not usable within a class

SourceCode rswhite4 at googlemail.com
Thu Oct 27 13:36:19 PDT 2011


But what if i had something like this:

abstract class A {
package:
   abstract void _test() const;
}

class B : public A {
package:
    override void _test() const { writeln("Call B::test"); }
}

class C {
public:
    void do_something(const B b) {
        b._test();
    }
}

That only work if i define the method public. But Imo that must
work, because that is imo the correct use of package.


More information about the Digitalmars-d-learn mailing list