annotate run/m/mixin_37_B.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1562
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
1 // $HeadURL$
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
2 // $Date$
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
3 // $Author$
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
4
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
5 // @author@ <aziz.kerim@gmail.com>
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
6 // @date@ 2007-09-26
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1534
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
8 // @desc@ [Issue 1534] Can't mix in a case statement.
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
9
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
10 module dstress.run.m.mixin_37_B;
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
11
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
12 int check(int i){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
13 switch(i){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
14 case 0:{ return 1; }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
15 case 1, 2:
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
16 return 2;
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
17 default:
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
18 return 3;
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
19 }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
20 }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
21
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
22 int main(){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
23 if(1 != check(0)){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
24 assert(0);
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
25 }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
26 if(2 != check(1)){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
27 assert(0);
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
28 }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
29 if(3 != check(-1)){
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
30 assert(0);
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
31 }
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
32 return 0;
539ede0215a4 r8715@birke: tk | 2007-09-29 23:52:45 +0200
thomask
parents:
diff changeset
33 }