Mercurial > projects > dstress
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 |
rev | line source |
---|---|
799 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Sean Kelly <sean@f4.ca> | |
6 // @date@ 2006-01-24 | |
7 // @uri@ news:dr5uqg$2hn7$1@digitaldaemon.com | |
1380 | 8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=704 |
799 | 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 | 11 |
12 bool hadDtor = false; | |
13 | |
14 class MyClass{ | |
15 this(){ | |
16 throw new Exception("dummy"); | |
17 } | |
18 | |
19 ~this(){ | |
20 hadDtor = true; | |
21 throw new Exception("should never throw"); | |
22 } | |
23 } | |
24 | |
25 int main(){ | |
26 | |
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 | 29 c = new MyClass(); |
30 }catch{ | |
31 if(!hadDtor){ | |
32 return 0; | |
33 }else{ | |
34 assert(0); | |
35 } | |
36 } | |
37 | |
38 assert(0); | |
39 } |