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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
1 // $HeadURL$
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
2 // $Date$
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
3 // $Author$
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
4
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
6 // @date@ 2005-04-14
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 799
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3645
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
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
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
10
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
11 int status;
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
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
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
14 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
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
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
17 this(){
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
18 if(0 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
19 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
20 }
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
21 status=1;
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
22 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
23
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
24 ~this(){
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
25 if(1 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
26 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
27 }
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
28 status=2;
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
29 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
30 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
31
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
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
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
34 if(1 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
35 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
36 }
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
37 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
38
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
39 int main(){
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
40 test();
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
41
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
42 if(status==2){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
43 return 0;
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
44 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
45
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents: 431
diff changeset
46 assert(0);
431
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
47 }
61ec77e09b1e auto dtor / inheritance
thomask
parents:
diff changeset
48