to! converting 1D to 2D array

Marc Schütz" <schuetzm at gmx.net> Marc Schütz" <schuetzm at gmx.net>
Thu Mar 13 15:09:48 PDT 2014


On Wednesday, 12 March 2014 at 06:53:19 UTC, monarch_dodra wrote:
> I *believe* it's really just that you are allowed to 
> *initialize* a static array (of any depth) from a dynamic array.
>
> However, for assignment, it doesn't work that way:
>
>     int[] a = [0, 1, 2, 3];
>     int[2][1][2][1] b = a; //OK!
>     b = a; //ERROR

Is this intentional, or is it a bug?


More information about the Digitalmars-d-learn mailing list