annotate tangotests/marray2.d @ 286:a3b7c19c866c trunk

[svn r307] Fixed: multidimensional new expressions now work. Eg.: auto ma = new int[][] (3,9);
author lindquist
date Sat, 21 Jun 2008 04:47:14 +0200
parents
children
rev   line source
lindquist@286 1 module tangotests.marray2;
lindquist@286 2
lindquist@286 3 void main()
lindquist@286 4 {
lindquist@286 5 int[][] ma = new int[][](2,4);
lindquist@286 6 assert(ma.length == 2);
lindquist@286 7 assert(ma[0].length == 4);
lindquist@286 8 assert(ma[1].length == 4);
lindquist@286 9 ma[0][3] = 32;
lindquist@286 10 ma[1][2] = 123;
lindquist@286 11 ma[0][0] = 55;
lindquist@286 12 assert(ma[0][3] == 32);
lindquist@286 13 assert(ma[1][2] == 123);
lindquist@286 14 assert(ma[0][0] == 55);
lindquist@286 15 }