Comment #0 by bearophile_hugs — 2010-03-17T20:14:56Z
This is wrong D2 code:
struct Foo {
static Foo opCall() {}
}
void main() {
Foo[Foo] a;
a.values;
}
Assertion failure: 'impl' on line 3901 in file 'mtype.c'
Comment #1 by clugdbug — 2010-04-09T02:28:20Z
PATCH:
TypeAArray::getImpl(), mtype.c line 3906.
#endif
+ // If there are global errors, TemplateInstance::semantic()
+ // will refuse to instantiate the template.
+ // So we need to temporarily set errors to zero.
+ int olderrors = global.errors;
+ global.errors = 0;
ti->semantic(sc);
ti->semantic2(sc);
ti->semantic3(sc);
+ global.errors += olderrors;
impl = ti->toAlias()->isStructDeclaration();