annotate nocompile/overload_14.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 b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
316
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
1 // $HeadURL$
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
2 // $Date$
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
3 // $Author$
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
4
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
5 // @author@ Nick Sabalausky <z@a.a>
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
6 // @date@ 2005-02-01
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 1383
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2825
1383
52c9e86b6486 @url@ -> @uri@
thomask
parents: 421
diff changeset
8 // @uri@ nntp://news.digitmars.com/digitalmars.D.bugs
316
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
9
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
10 // name resolution happens before overload resolution
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
11
374
f87ba6507260 added missing meta-data
thomask
parents: 316
diff changeset
12 // __DSTRESS_ELINE__ 25
f87ba6507260 added missing meta-data
thomask
parents: 316
diff changeset
13
421
0f87eb2e93fd fixed module names
thomask
parents: 374
diff changeset
14 module dstress.nocompile.overload_14;
316
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
15
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
16 int status;
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
17
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
18 void check(int x){
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
19 status++;
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
20 }
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
21
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
22 class MyClass{
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
23 void test(){
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
24 assert(status==0);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
25 check(0);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
26 assert(status==1);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
27 check();
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
28 assert(status==3);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
29 }
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
30
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
31 void check(){
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
32 assert(status==1);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
33 status+=2;
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
34 }
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
35 }
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
36
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
37 int main(){
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
38 MyClass c = new MyClass();
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
39 assert(status==0);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
40 c.test();
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
41 assert(status==3);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
42 check(0);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
43 assert(status==4);
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
44 return 0;
bebf25858c08 updated testcases to DMD version 0.118
thomask
parents:
diff changeset
45 }