[Issue 5554] New: [qtd] Covariance detection failure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 9 01:46:32 PST 2011


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

           Summary: [qtd] Covariance detection failure
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 2011-02-09 01:44:07 PST ---
class MA
{
}

class MB : MA
{
}

class MC : MB
{
}

class A
{    
    MA foo() { return null; }
}

interface I
{
    MB foo();
}

class B : A
{    
    override MC foo() { return null; }
}

class C : B, I
{    
    override MC foo() { return null; }
}

void main()
{
}

----
Error: function test.C.foo incompatible covariant types MA() and MB()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list