comparison run/s/scope_18_C.d @ 1460:d0ab95b04926

[Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop Thomas K?hne <thomas-dloop@kuehne.cn> 2007-01-07 http://d.puremagic.com/issues/show_bug.cgi?id=815
author thomask
date Thu, 05 Apr 2007 10:28:19 +0000
parents
children
comparison
equal deleted inserted replaced
1459:872b6f641b5d 1460:d0ab95b04926
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Thomas Kühne <thomas-dloop@kuehne.cn>
6 // @date@ 2007-01-07
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=815
8 // @desc@ [Issue 815] scope(exit) isn't executed when "continue" is used to continue a while-loop
9
10 module dstress.run.s.scope_18_C;
11
12 int main(){
13 int[] log;
14 int i = 3;
15
16 while(i--){
17 scope(failure){
18 log ~= 0xEE;
19 }
20 log ~= i;
21
22 if(i % 2){
23 continue;
24 }
25 log ~= 0xFF;
26 }
27
28 if([2, 0xFF, 1, 0, 0xFF] != log){
29 assert(0);
30 }
31
32 return 0;
33 }