[Issue 8221] New: typeof(null) rejected as return type for covariant overrides

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 11 08:18:46 PDT 2012


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

           Summary: typeof(null) rejected as return type for covariant
                    overrides
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-06-11 08:20:54 PDT ---
DMD 2.059:

class A{
    A foo(){return this;}
}
class B: A{
    override typeof(null) foo(){return null;} // error
}

The code should compile.

-- 
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