Error with associative array initializer
Oskar Linde
oskar.lindeREM at OVEgmail.com
Tue Jul 3 07:51:27 PDT 2007
Pontus skrev:
>> Make sure the type of the first expression is a dynamic array. "ab"[] or
>> cast(char[])"ab" would work.
>
> I see that it works, but is it not a bit weird?
>
> The type declarations is char[][int], the first part(char[]) looks like
> a dynamic array to me. Why would the compiler assume it is char[2] just
> because the first element of the intializer looks like it?
Walter thought the alternative behavior would be confusing to users.
From all users asking the the same question, I'd say it seems to be the
other way around.
/Oskar
More information about the Digitalmars-d-learn
mailing list