Is there a way to specify that a function is nonvirtual, but can still be
"overriden" in base classes? e.g.

class A
{
    void foo()
    {
        writeln("A");
    }
}

class B : A
{
    void foo()
    {
        writeln("B");
    }
}

void main()
{
    (new A).foo();
    (new B).foo();
}

Should output:
A
B

Is there a way to do this?

Reply via email to