comparison run/m/mixin_37_A.d @ 1562:539ede0215a4

r8715@birke: tk | 2007-09-29 23:52:45 +0200 [Issue 1534] Can't mix in a case statement. <aziz.kerim@gmail.com> 2007-09-26 http://d.puremagic.com/issues/show_bug.cgi?id=1534
author thomask
date Sun, 30 Sep 2007 09:44:14 +0000
parents
children
comparison
equal deleted inserted replaced
1561:24fcb78d93f6 1562:539ede0215a4
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ <aziz.kerim@gmail.com>
6 // @date@ 2007-09-26
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1534
8 // @desc@ [Issue 1534] Can't mix in a case statement.
9
10 module dstress.run.m.mixin_37_A;
11
12 int check(int i){
13 switch(i){
14 mixin("case 0:{ return 1;}");
15 case 1, 2:
16 return 2;
17 default:
18 return 3;
19 }
20 }
21
22 int main(){
23 if(1 != check(0)){
24 assert(0);
25 }
26 if(2 != check(1)){
27 assert(0);
28 }
29 if(3 != check(-1)){
30 assert(0);
31 }
32 return 0;
33 }