On Tuesday, 27 October 2015 at 00:27:46 UTC, Tofu Ninja wrote:
...

crap, copy paste error
change the main to

void main()
{
        A a = new A();
        a.foo(); // prints nothing
        a.bar(); // prints nothing

        B b = new B();
        b.foo(); // prints X
        b.bar(); // prints X

        A c = new B();
        c.foo(); // prints nothing
        c.bar(); // prints X, <--- main advantage
}

Reply via email to