Bug 3982 – [ICE] a.values on wrong AA

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-17T20:14:00Z
Last change time
2014-02-15T02:44:59Z
Keywords
ice-on-invalid-code, patch
Assigned to
nobody
Creator
bearophile_hugs

Comments

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();
Comment #2 by clugdbug — 2010-05-05T23:50:40Z
Fixed DMD 2.044