Bug 7219 – valid overrides with type qualifiers rejected

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2012-01-04T09:30:00Z
Last change time
2013-11-26T23:00:40Z
Keywords
rejects-valid
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-01-04T09:30:04Z
With DMD 2.057, all three overrides fail: class A{ void foo(immutable(int)[] x){} immutable(int)[] bar(immutable(int)[] x){return x;} immutable(int) qux(immutable(int) y){return y;} } class B: A{ override void foo(const(int)[] x){} override inout(int)[] bar(inout(int)[] x){return x;} override int qux(int y){return y;} } The code should compile.
Comment #1 by yebblies — 2013-11-26T23:00:40Z
Parameter contravariance again. *** This issue has been marked as a duplicate of issue 3075 ***