Summary: Ambiguous virtual function error on const overloading
                    with covariant return types
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Read Bixby <> 2012-04-01 13:55:17 PDT ---
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.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to