mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
34 lines
489 B
D
34 lines
489 B
D
// https://issues.dlang.org/show_bug.cgi?id=23586
|
|
|
|
int test23686a(int x)
|
|
{
|
|
switch(x)
|
|
{
|
|
case 0:
|
|
goto Bar;
|
|
|
|
Bar:
|
|
default:
|
|
auto y = 6;
|
|
return y;
|
|
}
|
|
}
|
|
|
|
int test23686b(int x)
|
|
{
|
|
switch(x)
|
|
{
|
|
case 0:
|
|
Bar:
|
|
case 1:
|
|
case 2:
|
|
auto y = 7;
|
|
return y;
|
|
|
|
default:
|
|
goto Bar;
|
|
}
|
|
}
|
|
|
|
static assert(test23686a(0) == 6);
|
|
static assert(test23686b(3) == 7);
|