https://d.puremagic.com/issues/show_bug.cgi?id=12508
Summary: Codegen bug for interface type covariant return with lambda type inference Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2014-04-02 22:11:59 PDT --- From: http://forum.dlang.org/thread/trgoqwtuxzioefero...@forum.dlang.org Test case: interface A(T) { T getT(); } class C : A!double { double getT() { return 1; } } void mwriteln(A!double delegate() dg) { import core.stdc.stdio; auto a = dg(); assert(a !is null); assert(a.getT() == 1.0); // fails! } void main() { mwriteln({ return new C(); }); } -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------