January 18, 2012 [Issue 7315] New: 'out' parameters should be covariant | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7315 Summary: 'out' parameters should be covariant Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: timon.gehr@gmx.ch --- Comment #0 from timon.gehr@gmx.ch 2012-01-18 15:17:24 PST --- 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); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation