Mercurial > projects > dstress
annotate run/scope_07.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 | 8d5c55d163fd |
children |
rev | line source |
---|---|
431 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Sean Kelly <sean@f4.ca> | |
6 // @date@ 2005-04-14 | |
1489 | 7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645 |
431 | 8 |
1615
8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents:
1559
diff
changeset
|
9 module dstress.run.scope_07; |
431 | 10 |
11 int status; | |
12 | |
1615
8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents:
1559
diff
changeset
|
13 scope class Parent{ |
431 | 14 } |
15 | |
1615
8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents:
1559
diff
changeset
|
16 scope class Child : Parent{ |
431 | 17 this(){ |
1559 | 18 if(0 != status){ |
19 assert(0); | |
20 } | |
431 | 21 status=1; |
22 } | |
23 | |
24 ~this(){ | |
1559 | 25 if(1 != status){ |
26 assert(0); | |
27 } | |
431 | 28 status=2; |
29 } | |
30 } | |
31 | |
32 void test(){ | |
1615
8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents:
1559
diff
changeset
|
33 scope Parent o = new Child(); |
1559 | 34 if(1 != status){ |
35 assert(0); | |
36 } | |
431 | 37 } |
38 | |
39 int main(){ | |
40 test(); | |
799 | 41 |
42 if(status==2){ | |
43 return 0; | |
44 } | |
45 | |
46 assert(0); | |
431 | 47 } |
48 |