Bug 7140 – DMD hangs on isExpression with template default and variadic parameter
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-20T00:46:00Z
Last change time
2012-09-21T07:31:53Z
Keywords
ice
Assigned to
nobody
Creator
simen.kjaras
Comments
Comment #0 by simen.kjaras — 2011-12-20T00:46:51Z
struct Bug(A, B = A, C...) {}
void main( ) {
static if ( is( Bug!int t == Bug!(A, B, C), A, B, C ) ) {}
}
Comment #1 by clugdbug — 2011-12-31T17:52:34Z
template.c, TypeInstance::deduceType(), line 2650.
/* Create tuple from remaining args
*/
Tuple *vt = new Tuple();
size_t vtdim = tempinst->tiargs->dim - i;
vt->objects.setDim(vtdim);
for (size_t k = 0; k < vtdim; k++)
vt->objects.tdata()[k] = tempinst->tiargs->tdata()[i + k];
vtdim < 0. At the start of the loop (at L2:) this is the "pick up default arg" case.