Bug 7315 – 'out' parameters should be covariant

Status
REOPENED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-18T15:17:24Z
Last change time
2024-12-13T17:57:44Z
Assigned to
No Owner
Creator
timon.gehr
Moved to GitHub: dmd#18399 →

Comments

Comment #0 by timon.gehr — 2012-01-18T15:17:24Z
The following code should compile: class A{ void foo(out A a){ a=new A; } } class B:A{ override void foo(out B b){ b=new B; } } void main(){ A a; B b = new B; b.foo(a); }
Comment #1 by robert.schadek — 2024-12-13T17:57:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18399 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB