mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
35 lines
573 B
D
35 lines
573 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/goto3.d(1010): Error: case cannot be in different `try` block level from `switch`
|
|
fail_compilation/goto3.d(1012): Error: default cannot be in different `try` block level from `switch`
|
|
---
|
|
*/
|
|
|
|
|
|
void foo();
|
|
void bar();
|
|
|
|
#line 1000
|
|
|
|
void test1()
|
|
{
|
|
int i;
|
|
switch (i)
|
|
{
|
|
case 1:
|
|
try
|
|
{
|
|
foo();
|
|
case 2:
|
|
{ }
|
|
default:
|
|
{ }
|
|
}
|
|
finally
|
|
{
|
|
bar();
|
|
}
|
|
break;
|
|
}
|
|
}
|