cat > bug.d << CODE
void main()
{
size_t[ubyte] aa;
aa[0] = aa.length;
assert(aa[0] == 0);
}
CODE
dmd -run bug
--------
aa.length is evaluated after a new entry was added to the AA.
A similar test for arrays works correctly.
Comment #1 by yebblies — 2012-10-29T06:26:23Z
*** This issue has been marked as a duplicate of issue 3825 ***