annotate run/s/scope_21_A.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_A.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_A;
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
1615
8d5c55d163fd Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents: 1380
diff changeset
14 scope class MyClass{
799
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 try{
1615
8d5c55d163fd Fix some outdated tests that used auto to mean scope.
Christian Kamm <kamm incasoftware de>
parents: 1380
diff changeset
27 scope MyClass c;
799
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
28 c = new MyClass();
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
29 }catch{
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
30 if(!hadDtor){
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
31 return 0;
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
32 }else{
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
33 assert(0);
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
34 }
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 assert(0);
c67acdbaf88e Sean Kelly <sean@f4.ca>
thomask
parents:
diff changeset
38 }