D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5675 - ICE(e2ir) on AALiteral call expression
Summary: ICE(e2ir) on AALiteral call expression
Status: RESOLVED DUPLICATE of issue 4460
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice
: 6324 6943 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-03-01 09:07 UTC by Martin Nowak
Modified: 2012-04-11 01:01 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2011-03-01 09:07:11 UTC
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 kennytm 2011-03-05 23:02:33 UTC
Seems to be the same cause as issue 4460.
Comment 2 Iain Buclaw 2011-04-23 12:40:36 UTC
Patch in issue 4460 fixes this.
Comment 3 yebblies 2011-07-16 00:45:35 UTC
*** Issue 6324 has been marked as a duplicate of this issue. ***
Comment 4 yebblies 2011-12-12 22:16:38 UTC
*** Issue 6943 has been marked as a duplicate of this issue. ***
Comment 5 Don 2012-04-11 01:01:07 UTC
Works now.

*** This issue has been marked as a duplicate of issue 4460 ***