The following code produces the error: "Error: class Implementation ambiguous virtual function getNext" interface Interface { Interface getNext(); const(Interface) getNext() const; } class Implementation : Interface { Implementation getNext() { return null; } const(Implementation) getNext() const { return null; } } The error does not appear if "Interface" is changed to an abstract class.
https://github.com/D-Programming-Language/dmd/pull/858
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fecb72a7f64e346c27e082bf89efde83ff9ddf5b fix Issue 7807 - Ambiguous virtual function error on const overloading with covariant return types