Bug 10940 – Interface post-condition breaks sub-interface covariance.

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-01T10:39:00Z
Last change time
2015-07-06T04:53:06Z
Assigned to
nobody
Creator
jeremiep

Comments

Comment #0 by jeremiep — 2013-09-01T10:39:59Z
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.
Comment #1 by k.hara.pg — 2015-07-06T04:53:06Z
Fixed in 2.064. *** This issue has been marked as a duplicate of issue 10479 ***