Bug 2253 – Assertion failure: 'global.errors' on line 3820 in file 'template.c'
Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-07-29T19:42:00Z
Last change time
2015-06-09T01:20:00Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
pelekhay
Comments
Comment #0 by pelekhay — 2008-07-29T19:42:48Z
folowing code crashes dmd
template ArgTypes( F )
{
U argTypes(R, U...)(R delegate (U));
F func();
alias typeof(argTypes(func())) ArgTypes;
}
struct S
{
ArgTypes!(typeof(opCall))[0] f_arg;
static S opCall(int a_arg)
{
typeof(return) result;
result.f_arg = a_arg;
return result;
}
}
Comment #1 by clugdbug — 2009-04-24T03:08:53Z
Reduces to:
template ArgTypes( F ) { }
ArgTypes!(typeof(foo)) f_arg;
void foo() { }
which is the same as 2884.
*** This bug has been marked as a duplicate of 2884 ***