T[n] a; immutable(T)[n] b = a; // error
bearophile
bearophileHUGS at lycos.com
Sat Oct 1 04:13:41 PDT 2011
Peter Alexander:
> int[2] a;
> immutable(int)[2] b = a;
>
> I get "Error: cannot implicitly convert expression (a) of type int[2u]
> to immutable(int)[]"
>
> Is there are reason for disallowing this, or is it a bug?
It's a bug.
And I think the error message too is wrong, it prints "immutable(int)[]" instead of "immutable(int)[2]".
Bye,
bearophile
More information about the Digitalmars-d
mailing list