annotate run/o/overload_23.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
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
1 // $HeadURL$
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
2 // $Date$
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
3 // $Author$
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
4
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
5 // @author@ Kris <fu@bar.com>
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
6 // @date@ 2005-05-20
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 1270
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4081
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
8
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
9 module dstress.run.o.overload_23;
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
10
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
11 class Base{
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
12 package char[] name(){
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
13 return "base";
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
14 }
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
15 }
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
16
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
17 class Derived:Base{
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
18 package char[] name(){
1091
9dcac8d4e97f post DMD-0.163 review
thomask
parents: 1086
diff changeset
19 return "derived";
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
20 }
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
21 }
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
22
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
23 int main(){
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
24 Base b = new Base;
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
25 if(b.name != "base"){
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
26 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
27 }
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
28
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
29 Derived d = new Derived;
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
30 if(d.name != "derived"){
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
31 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
32 }
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
33
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
34 Base bd = new Derived;
1270
660f9196b52a partial review
thomask
parents: 1091
diff changeset
35 if(bd.name != "base"){
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
36 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 549
diff changeset
37 }
549
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
38 return 0;
965b2cd4d7a9 package / overload
thomask
parents:
diff changeset
39 }