A problem with AAs
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Jan 24 05:57:37 PST 2008
"bearophile" <bearophileHUGS at lycos.com> wrote in message
news:fn9rkq$210u$1 at digitalmars.com...
> But I can't accept that because it changes the type of the values (from a
> static to a dynamic array). (If this problem can't be solved then I think
> I'll just restrict the xvalues/xkeys to AAs that don't have static arrays
> as keys/values).
That's probably the best you _can_ do. The issue, as usual, arises from AA
literals being weird.
> void main() {
> xvalues(["ab":"AB"]);
> }
If you use ["ab"[] : "AB"[]] instead, it works, as the key and value types
are now interpreted as char[].
More information about the Digitalmars-d-learn
mailing list