Comment #0 by daniel.keep+d.puremagic.com — 2007-01-18T03:24:06Z
If you try to create an anonymous delegate with a TypeTuple in the argument list, you get an ICE.
Steps to reproduce:
1) Attempt to compile code below with "dmd glue_gd_ice.d".
Actual result:
The compiler crashes with the following message:
"Assertion failure: '0' on line 700 in file 'glue.c'"
Expected result:
The code to compile, or at least display a meaningful error message.
Compiler: Digital Mars D Compiler v1.0, WinXP SP2.
Code to reproduce: (glue_dg_ice.d)
import std.typetuple;
void main()
{
auto x = (uint a, uint b) { return a*b; };
auto y = (TypeTuple!(uint,uint) ab) { return ab[0] * ab[1]; };
}
*** Bug 1214 has been marked as a duplicate of this bug. ***
Comment #3 by fvbommel — 2009-03-29T17:49:01Z
I just fixed this bug in LDC, and I'm attaching a patch that makes the same change to DMD.
I haven't been able to test this version because some files seem to be missing...
(See the FIXME in the patch for something I'm not sure about)
Comment #4 by fvbommel — 2009-03-29T17:49:49Z
Created attachment 300
Patch which fixes this for LDC.
Comment #5 by fvbommel — 2009-03-30T07:29:55Z
After some changes to DMD 1.041 to get it to compile on my machine, I managed to verify that the attached patch fixes both the original example and the dstress tests.
Comment #6 by bugzilla — 2009-06-20T23:09:05Z
This works in D2, the solution is to do the semantics on the parameter types at the start of the semantic(). I've folded the changes to do this from D2 to D1 (for next update).