[Issue 2511] New: dmd finds a proper overload as a non-covariant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 13 08:21:26 PST 2008


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: bugzilla at digitalmars.com
        ReportedBy: 2korden at 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.


-- 



More information about the Digitalmars-d-bugs mailing list