comparison run/scope_06.d @ 1615:8d5c55d163fd

Fix some outdated tests that used auto to mean scope.
author Christian Kamm <kamm incasoftware de>
date Sun, 12 Jul 2009 16:44:52 +0200
parents run/auto_06.d@ec5e144583ea
children
comparison
equal deleted inserted replaced
1614:709f6451b315 1615:8d5c55d163fd
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 module dstress.run.scope_06;
6
7 int status;
8
9 scope class A{
10 int cond;
11
12 this(int cond){
13 this.cond=cond;
14 }
15
16 ~this(){
17 if(cond != status){
18 assert(0);
19 }
20 status--;
21 }
22 }
23
24 void test(){
25 scope A a = new A(-1);
26 scope A b = new A(0);
27 }
28
29 int main(){
30 test();
31
32 if(status==-2){
33 return 0;
34 }
35 }