AA reference semantics

Daniel Murphy yebblies at nospamgmail.com
Tue Mar 13 22:20:32 PDT 2012


"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message 
news:mailman.652.1331699976.4860.digitalmars-d at puremagic.com...
> Is this a bug?
>

Nope.


> int[string] aa, bb;
aa == bb == null

> bb = aa;
same

> aa["abc"] = 123;
A new AA is created.


> assert(bb["abc"] == 123); // assertion fails
>

B is still null 




More information about the Digitalmars-d mailing list