Bug 12508 – Codegen bug for interface type covariant return with lambda type inference

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-02T22:11:00Z
Last change time
2014-04-11T06:28:53Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-04-02T22:11:59Z
From: http://forum.dlang.org/thread/[email protected] 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(); }); }
Comment #1 by k.hara.pg — 2014-04-02T22:25:31Z
Comment #2 by github-bugzilla — 2014-04-11T06:28:52Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7d65ec866eaec784bb67138d65fe1d7e208d7c60 fix Issue 12508 - Codegen bug for interface type covariant return with lambda type inference https://github.com/D-Programming-Language/dmd/commit/527ea20c04b70df4ad2406c25f2dbb8973d26fa7 Merge pull request #3417 from 9rnsr/fix12508 Issue 12508 - Codegen bug for interface type covariant return with lambda type inference