d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test22999.d
blob99dfe70378b99f07640145973ecb54a011f68013
1 /*
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/test22999.d(18): Deprecation: switch case fallthrough - use 'goto default;' if intended
6 fail_compilation/test22999.d(25): Deprecation: switch case fallthrough - use 'goto case;' if intended
7 ---
8 */
10 // no switch fallthrough error with multi-valued case
11 // https://issues.dlang.org/show_bug.cgi?id=22999
12 void main()
14 int i;
15 switch (0)
17 case 0, 1: i = 20;
18 default: assert(0);
21 switch (0)
23 default:
24 case 0, 1: i = 20;
25 case 2, 3: i = 30;