digitalmars.D.bugs - [Issue 10940] New: Interface post-condition breaks sub-interface covariance.
- d-bugmail puremagic.com (25/25) Sep 01 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10940
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: nobody puremagic.com
ReportedBy: jeremiep gmail.com
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: -------
Sep 01 2013








d-bugmail puremagic.com