Bug 5675 – ICE(e2ir) on AALiteral call expression

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-03-01T09:07:00Z
Last change time
2012-04-11T01:01:07Z
Keywords
ice
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-03-01T09:07:11Z
void main() { enum aa = [1 : 2, 2 : 4]; auto e = aa.length(); } -- This asserts in AssocArrayLiteralExp::toElem(IRState *irs) Type *t = type->toBasetype()->mutableOf(); assert(t->ty == Taarray); But the type of aa is AssociativeArray!(int,int), so t->ty is Tstruct.
Comment #1 by kennytm — 2011-03-05T23:02:33Z
Seems to be the same cause as issue 4460.
Comment #2 by ibuclaw — 2011-04-23T12:40:36Z
Patch in issue 4460 fixes this.
Comment #3 by yebblies — 2011-07-16T00:45:35Z
*** Issue 6324 has been marked as a duplicate of this issue. ***
Comment #4 by yebblies — 2011-12-12T22:16:38Z
*** Issue 6943 has been marked as a duplicate of this issue. ***
Comment #5 by clugdbug — 2012-04-11T01:01:07Z
Works now. *** This issue has been marked as a duplicate of issue 4460 ***