Error with associative array initializer

Pontus pontus at update.uu.se
Tue Jul 3 03:10:33 PDT 2007


> 
> 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?

/P


More information about the Digitalmars-d-learn mailing list