annotate run/s/scope_21_B.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/a/auto_14_B.d@902d2c168029
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
1 // $HeadURL$
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
2 // $Date$
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
3 // $Author$
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
4
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
6 // @date@ 2006-01-24
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
7 // @uri@ news:dr5uqg$2hn7$1@digitaldaemon.com
1380
902d2c168029 updates for DMD-1.007
thomask
parents: 1089
diff changeset
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=704
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
9
1615
8d5c55d163fd Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents: 1380
diff changeset
10 module dstress.run.s.scope_21_B;
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
11
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
12 bool hadDtor = false;
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
13
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
14 class MyClass{
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
15 this(){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
16 throw new Exception("dummy");
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
17 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
18
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
19 ~this(){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
20 hadDtor = true;
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
21 throw new Exception("should never throw");
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
22 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
23 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
24
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
25 int main(){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
26
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
27 try{
1615
8d5c55d163fd Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents: 1380
diff changeset
28 scope MyClass c;
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
29 c = new MyClass();
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
30 }catch{
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
31 if(!hadDtor){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
32 return 0;
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
33 }else{
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
34 assert(0);
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
35 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
36 }
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
37
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
38 assert(0);
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
39 }