| 1 |
/* |
| 2 |
DFLAGS: |
| 3 |
REQUIRED_ARGS: -c |
| 4 |
EXTRA_SOURCES: extra-files/minimal/object.d |
| 5 |
TEST_OUTPUT: |
| 6 |
--- |
| 7 |
fail_compilation/no_Throwable.d(14): Error: cannot use `throw` statements because `object.Throwable` was not declared |
| 8 |
fail_compilation/no_Throwable.d(19): Error: cannot use try-catch statements because `object.Throwable` was not declared |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
void test() |
| 13 |
{ |
| 14 |
throw new Exception("msg"); |
| 15 |
} |
| 16 |
|
| 17 |
void test2() |
| 18 |
{ |
| 19 |
try |
| 20 |
{ |
| 21 |
test(); |
| 22 |
} |
| 23 |
catch (Exception e) |
| 24 |
{ |
| 25 |
} |
| 26 |
} |