1015
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Ivan Senji <ivan.senji_REMOVE_@_THIS__gmail.com>
|
|
6 // @date@ 2005-11-28
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5691
|
1015
|
8
|
|
9 module dstress.run.a.auto_18_B;
|
|
10
|
|
11 int main(){
|
|
12 static auto a = [[0, 1], [-2, 3, 4], [5]];
|
|
13 auto b = -2;
|
|
14
|
|
15 static if(!is(typeof(a[0][0]) : typeof(b))){
|
|
16 static assert(0);
|
|
17 }
|
|
18
|
|
19 if(a.length != 3){
|
|
20 assert(0);
|
|
21 }
|
|
22
|
|
23 if(a[0].length != 2){
|
|
24 assert(0);
|
|
25 }
|
|
26 if(a[0][0] != 0){
|
|
27 assert(0);
|
|
28 }
|
|
29 if(a[0][1] != 1){
|
|
30 assert(0);
|
|
31 }
|
|
32
|
|
33 if(a[1].length != 3){
|
|
34 assert(0);
|
|
35 }
|
|
36 if(a[1][0] != -2){
|
|
37 assert(0);
|
|
38 }
|
|
39 if(a[1][1] != 3){
|
|
40 assert(0);
|
|
41 }
|
|
42 if(a[1][2] != 4){
|
|
43 assert(0);
|
|
44 }
|
1089
|
45
|
1015
|
46 if(a[2].length != 1){
|
|
47 assert(0);
|
|
48 }
|
|
49 if(a[2][0] != 5){
|
|
50 assert(0);
|
|
51 }
|
|
52 return 0;
|
|
53 }
|
|
54
|