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 ***