1 // https://issues.dlang.org/show_bug.cgi?id=854
2 // TypeTuple in anonymous delegate causes ice in glue.c
4 /* 854 VOTE PATCH (=2863, =2251?) Assertion failure: '0' on line 935 in file 'glue.c'
5 I haven't checked this patch myself.
6 --- dmd/func.c 2009-03-05 01:56:46.000000000 +0100
7 +++ dmd-fixed/func.c 2009-03-30 00:39:41.000000000 +0200
14 + for (size_t i = 0; i < Argument::dim(f->parameters); i++)
16 + Argument *arg = (Argument *)Argument::getNth(f->parameters, i);
17 + Type* nw = arg->type->semantic(0, sc);
18 + if (arg->type != nw) {
20 + // Examine this index again.
21 + // This is important if it turned into a tuple.
22 + // In particular, the empty tuple should be handled or the
23 + // next parameter will be skipped.
24 + // FIXME: Maybe we only need to do this for tuples,
25 + // and can add tuple.length after decrement?
29 + // update nparams to include expanded tuples
30 + nparams = Argument::dim(f->parameters);
33 // Propagate storage class from tuple parameters to their element-parameters.
43 auto y
= (Foo
!(int) x
){ return 0; };