annotate run/a/array_initialization_27_D.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 902d2c168029
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1268
93511f726375 partial review
thomask
parents:
diff changeset
1 // $HeadURL$
93511f726375 partial review
thomask
parents:
diff changeset
2 // $Date$
93511f726375 partial review
thomask
parents:
diff changeset
3 // $Author$
93511f726375 partial review
thomask
parents:
diff changeset
4
1380
902d2c168029 updates for DMD-1.007
thomask
parents: 1268
diff changeset
5 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=706
902d2c168029 updates for DMD-1.007
thomask
parents: 1268
diff changeset
6 // @desc@ [Issue 706] incorrect type deduction for array literals in functions
902d2c168029 updates for DMD-1.007
thomask
parents: 1268
diff changeset
7
1268
93511f726375 partial review
thomask
parents:
diff changeset
8 module dstress.run.a.array_initialization_27_D;
93511f726375 partial review
thomask
parents:
diff changeset
9
93511f726375 partial review
thomask
parents:
diff changeset
10 auto a = [[1, 2], [3, 4]];
93511f726375 partial review
thomask
parents:
diff changeset
11
93511f726375 partial review
thomask
parents:
diff changeset
12 int main(){
93511f726375 partial review
thomask
parents:
diff changeset
13 static if(!is(typeof(a[0][0]) == int)){
93511f726375 partial review
thomask
parents:
diff changeset
14 static assert(0);
93511f726375 partial review
thomask
parents:
diff changeset
15 }
93511f726375 partial review
thomask
parents:
diff changeset
16
93511f726375 partial review
thomask
parents:
diff changeset
17 if(a.length != 2){
93511f726375 partial review
thomask
parents:
diff changeset
18 assert(0);
93511f726375 partial review
thomask
parents:
diff changeset
19 }
93511f726375 partial review
thomask
parents:
diff changeset
20 if((a[0].length != 2) || (a[1].length != 2)){
93511f726375 partial review
thomask
parents:
diff changeset
21 assert(0);
93511f726375 partial review
thomask
parents:
diff changeset
22 }
93511f726375 partial review
thomask
parents:
diff changeset
23 if((a[0][0] != 1) || (a[0][1] != 2) || (a[1][0] != 3) || (a[1][1] != 4)){
93511f726375 partial review
thomask
parents:
diff changeset
24 assert(0);
93511f726375 partial review
thomask
parents:
diff changeset
25 }
93511f726375 partial review
thomask
parents:
diff changeset
26
93511f726375 partial review
thomask
parents:
diff changeset
27 return 0;
93511f726375 partial review
thomask
parents:
diff changeset
28 }