blob: 99dfe70378b99f07640145973ecb54a011f68013 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
REQUIRED_ARGS: -de
TEST_OUTPUT:
---
fail_compilation/test22999.d(18): Deprecation: switch case fallthrough - use 'goto default;' if intended
fail_compilation/test22999.d(25): Deprecation: switch case fallthrough - use 'goto case;' if intended
---
*/
// no switch fallthrough error with multi-valued case
// https://issues.dlang.org/show_bug.cgi?id=22999
void main()
{
int i;
switch (0)
{
case 0, 1: i = 20;
default: assert(0);
}
switch (0)
{
default:
case 0, 1: i = 20;
case 2, 3: i = 30;
}
}
|