Mercurial > projects > dstress
comparison run/s/switch_22_C.d @ 1604:cc724d521a34
Add note about possible issues with test case depending on switch scopes.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 28 Mar 2009 19:17:58 +0100 |
parents | 986983b8cf7a |
children |
comparison
equal
deleted
inserted
replaced
1603:2031b04871b3 | 1604:cc724d521a34 |
---|---|
6 // @date@ 2006-06-16 | 6 // @date@ 2006-06-16 |
7 // @uri@ news:e6umde$2ok0$2@digitaldaemon.com | 7 // @uri@ news:e6umde$2ok0$2@digitaldaemon.com |
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=729 | 8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=729 |
9 | 9 |
10 module dstress.run.s.switch_22_C; | 10 module dstress.run.s.switch_22_C; |
11 | |
12 /+ | |
13 The validity of this test case is dubious: | |
14 the spec is not explicit about scopes in a switch statement | |
15 and DMD transforms the scope(success) into: | |
16 | |
17 switch(3){ | |
18 bool success = true; | |
19 try { default: } | |
20 catch(Object e) { success = false; throw e; } | |
21 finally { if(success) i--; } | |
22 } | |
23 +/ | |
11 | 24 |
12 int main(){ | 25 int main(){ |
13 int i = 2; | 26 int i = 2; |
14 | 27 |
15 switch(3){ | 28 switch(3){ |