Mercurial > projects > dstress
annotate run/with_04.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 | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.with_04; | |
6 | |
16 | 7 Child dummySuper; |
8 | |
9 int value=1; | |
10 | |
11 class Parent{ | |
12 int value=2; | |
13 } | |
14 | |
15 class Child : Parent{ | |
16 int value=3; | |
17 } | |
18 | |
19 class GrandChild : Child { | |
20 int value=4; | |
21 | |
22 void test(){ | |
23 dummySuper=super; | |
24 value=5; | |
25 with(new Child()){ | |
26 assert(value==3); | |
27 assert(super==dummySuper); | |
28 } | |
29 } | |
30 } | |
31 | |
32 int main(){ | |
33 GrandChild c = new GrandChild(); | |
34 c.test(); | |
35 return 0; | |
36 } |