[Issue 5590] Regression(2.036) ICE(e2ir.c): when using .values on enum which is associative array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 9 08:20:11 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=5590



--- Comment #9 from yebblies <yebblies at gmail.com> 2012-02-10 03:20:09 EST ---
For anyone interested in why this bug exists:

When the 'aa' of 'aa.values' reaches e2ir, it is an 'ArrayLiteralExp' but is
typed as the 'AssociativeArray' struct, because the type is changed in order to
do member lookup.  Changing the type back to an AA doesn't work, I assume
because _d_assocarrayliteralTX returns a reference to an associative array and
the compiler gets very confused about where it's actually stored, which seems
to result in the wrong values in registers when .values is called.  Or, it
would if it didn't have the wrong type when it hit ::toElem.

This only applies to the AA methods that only exist in the AssociativeArray
struct in object.di

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list