Bug 4129 – ICE(glue.c, !vthis->csym, D1 only): anonymous delegate literal in tuple

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Windows
Creation time
2010-04-26T02:56:00Z
Last change time
2013-11-24T19:39:39Z
Keywords
ice
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2010-04-26T02:56:03Z
Applies at least as far back as DMD1.020; also applies to D2. Discovered while reducing bug 1350. Swapping the order of the two asserts allows it to compile. ========== void mountainGoat(Callbacks ...)() { alias Callbacks[0] Cb; assert(Callbacks[0].ptr); assert(Cb.ptr); } void gazelle() { mountainGoat!( (int i) { int x = i; } )(); }
Comment #1 by kennytm — 2011-05-31T08:57:53Z
Apparently fixed in 2.053. Not sure about 1.x.
Comment #2 by clugdbug — 2013-04-09T00:37:12Z
To make this compile on D2, needs to be changed so that it's a delegate literal again, instead of a function literal. Passes on D2, still ICE on D1. Revised test case: --- void mountainGoat(Callbacks ...)() { alias Callbacks[0] Cb; assert(Callbacks[0].ptr); assert(Cb.ptr); } void gazelle() { int m = 0; mountainGoat!( (int i) { int x = m + i; } )(); }
Comment #3 by k.hara.pg — 2013-11-24T19:39:39Z
D1 is not supported anymore.