[Issue 8363] Empty array literal does not implicitly convert to associative array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 9 08:54:14 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8363
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
Summary|Provide an intutive way to |Empty array literal does
|clear all entries in |not implicitly convert to
|Associative Array |associative array
--- Comment #3 from yebblies <yebblies at gmail.com> 2012-07-10 01:54:12 EST ---
(In reply to comment #0)
> aa = []; // clear all array entries
>
This should probably work.
>
> At this point only this works. I think this is not very intuitive.
>
> int[string] aa;
> int[string] empty;
>
> aa["foo"] = 1;
> aa = empty;
try
aa = null;
But be careful, don't forget AAs are reference types.
--
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