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

           Summary: Interface post-condition breaks sub-interface
                    covariance.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Jeremie Pelletier <[email protected]> 2013-09-01 10:39:59 
PDT ---
This code triggers the bug:

    interface A1 { A1 f() out(o) { assert(o !is null); } }
    interface A2 : A1 { override A2 f(); }

making the compiler output the following:

    Error: cast(const(A1))__result is not an lvalue

However, it compiles fine if I either remove the contract or change A2 to a
class.

I'm using DMD 2.063.2 on OS X Lion.

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

Reply via email to