1268
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
1380
|
5 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=706
|
|
6 // @desc@ [Issue 706] incorrect type deduction for array literals in functions
|
|
7
|
1268
|
8 module dstress.run.a.array_initialization_27_D;
|
|
9
|
|
10 auto a = [[1, 2], [3, 4]];
|
|
11
|
|
12 int main(){
|
|
13 static if(!is(typeof(a[0][0]) == int)){
|
|
14 static assert(0);
|
|
15 }
|
|
16
|
|
17 if(a.length != 2){
|
|
18 assert(0);
|
|
19 }
|
|
20 if((a[0].length != 2) || (a[1].length != 2)){
|
|
21 assert(0);
|
|
22 }
|
|
23 if((a[0][0] != 1) || (a[0][1] != 2) || (a[1][0] != 3) || (a[1][1] != 4)){
|
|
24 assert(0);
|
|
25 }
|
|
26
|
|
27 return 0;
|
|
28 }
|