gcc/libphobos/testsuite/libphobos.exceptions/rt_trap_exceptions_drt.d

12 lines
184 B
D

// { dg-shouldfail "uncaught exception" }
void test()
{
int innerLocal = 20;
throw new Exception("foo");
}
void main(string[] args)
{
string myLocal = "bar";
test();
}