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

           Summary: dmd finds a proper overload as a non-covariant
           Product: D
           Version: 2.021
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: 2kor...@gmail.com


Here is a sample code that triggers an error:

// File I.d
module I;

import Base;

interface I
{
}

interface SubI : I
{
}

// File Base.d
module Base;

import I;

class Base
{
    I create() {
        return null;
    }
}

class Derived : Base
{
    SubI create() {
        return null;
    }
}

Compilation options: "dmd I.d"
Note that "dmd Base.d" compiles okay.


-- 

Reply via email to