http://d.puremagic.com/issues/show_bug.cgi?id=7807

           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
        AssignedTo: nob...@puremagic.com
        ReportedBy: rbi...@hotmail.com


--- Comment #0 from Read Bixby <rbi...@hotmail.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to