annotate run/t/typedef_19_A.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 6d49ea394165
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1136
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
1 // $HeadURL$
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
2 // $Date$
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
3 // $Author$
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
4
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
5 // @author@ Anders Runesson <anders@runesson.info>
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
6 // @date@ 2006-07-16
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
7 // @uri@ news:1153058426.5844.3.camel@localhost
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
8 // @desc@ typedef, implicit cast, bug or feature?
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
9
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
10 module dstress.run.t.typedef_19_A;
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
11
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
12 class A{
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
13 int func(int i){
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
14 return i + 1;
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
15 }
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
16 }
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
17
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
18 typedef A B;
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
19
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
20 class C : B{
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
21 override int func(int i){
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
22 return super.func(i) * 2;
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
23 }
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
24 }
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
25
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
26 int main(){
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
27 C c = new C();
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
28
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
29 if(c.func(2) != 6){
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
30 assert(0);
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
31 }
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
32
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
33 return 0;
6d49ea394165 typedef, implicit cast, bug or feature?
thomask
parents:
diff changeset
34 }