In the code below, the second to the last line fails to compile. As far as I can tell it is because the override also overrides all overloads. I could imagine why it would occur with a virtual member function, but I would think it wouldn't be necessary with a final one.

@system
unittest
{
    class Foo
    {
        final string bar(double d) { return ""; }
        void bar(int x) { x++; };
    }

    class Foo2 : Foo
    {
        override void bar(int x) { }
    }

    Foo2 foo2 = new Foo2;
    foo2.bar(1);
string x = foo2.bar(1.0); //error that bar is not callable with doubles
    //string x = foo2.Foo.bar(1.0); //this compiles
}

Reply via email to