]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail34.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail34.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail34.d(31): Error: duplicate `case "123"` in switch statement
5 ---
6 */
7
8 // $HeadURL$
9 // $Date$
10 // $Author$
11
12 // @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
13 // @date@ 2004-11-17
14 // @uri@ news:u1gr62-kjv.ln1@kuehne.cn
15 // @url@ nntp://digitalmars.com/digitalmars.D.bugs/2288
16
17 // duplicate case "123" in switch statement
18
19 module switch_12;
20
21 int main()
22 {
23 string array = "123";
24 switch(array)
25 {
26 case "123":
27 {
28 assert(0);
29 break;
30 }
31 case "123":
32 {
33 assert(1);
34 break;
35 }
36 default:
37 {
38 return -1; // dummy
39 }
40 }
41 return 0;
42 }