abstract class Foo
{
    package void test();
}

class Bar : Foo
{
    override package void test() { }
}

function test.Bar.test cannot override a non-virtual function

TDPL says package can only be used at class-level (i.e. package class
Bar : Foo), outside classes or inside a struct.

I want to hide a virtual method from client code, but another free
function in a different module but in the same package as these
classes needs access to that method. Are there any technical reasons
why package is not allowed for virtual methods?

Reply via email to