← Back to index
|
Original Bugzilla link
Bug 11822 – `-de` switch causees ICE with `auto` return and other stuff
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-26T04:19:00Z
Last change time
2014-01-12T17:37:23Z
Keywords
ice, pull
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0
by verylonglogin.reg — 2013-12-26T04:19:22Z
This code should be rejected to compile with `-de` switch: --- struct S(alias pred) { this(int) { pred(1); } void f() { pred(1); } } auto g(alias pred)() { return S!pred(1); } deprecated bool d(int) { return true; } auto h() { int i; return g!(n => d(i))(); } --- main.d(16): Deprecation: function main.d is deprecated main.d(8): instantiated from here: S!(__lambda1) main.d(16): instantiated from here: g!((n) => d(i)) main.d(16): Error: template instance main.h.g!((n) => d(i)) error instantiating Assertion failure: 'type->ty == Tfunction' on line 3178 in file 'func.c' ---
Comment #1
by k.hara.pg — 2013-12-26T05:42:08Z
https://github.com/D-Programming-Language/dmd/pull/3034
This is a regression in 2.065alpha.
Comment #2
by k.hara.pg — 2014-01-02T20:37:32Z
*** Issue 11857 has been marked as a duplicate of this issue. ***
Comment #3
by bugzilla — 2014-01-11T13:22:50Z
https://github.com/D-Programming-Language/dmd/pull/3081
Comment #4
by github-bugzilla — 2014-01-12T17:20:30Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/73b477b46be16c8896c5306027577f6ddbdd26ce
fix Issue 11822 - switch causees ICE with return and other stuff
https://github.com/D-Programming-Language/dmd/commit/24c1dff4856983533e813b89c1d8adf9492936d0
Merge pull request #3081 from WalterBright/fix11822 fix Issue 11822 - switch causes ICE with return and other stuff