mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
26 lines
474 B
D
26 lines
474 B
D
/*
|
|
DFLAGS:
|
|
REQUIRED_ARGS: -c
|
|
EXTRA_SOURCES: extra-files/minimal/object.d
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/no_Throwable.d(14): Error: cannot use `throw` statements because `object.Throwable` was not declared
|
|
fail_compilation/no_Throwable.d(19): Error: cannot use try-catch statements because `object.Throwable` was not declared
|
|
---
|
|
*/
|
|
|
|
void test()
|
|
{
|
|
throw new Exception("msg");
|
|
}
|
|
|
|
void test2()
|
|
{
|
|
try
|
|
{
|
|
test();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
}
|
|
}
|