mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
28 lines
240 B
D
28 lines
240 B
D
module throw1;
|
|
|
|
extern(C) int rand();
|
|
|
|
class C
|
|
{
|
|
}
|
|
|
|
void func(bool b)
|
|
{
|
|
if (b)
|
|
throw new C;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
bool b = true;
|
|
try
|
|
{
|
|
func(b);
|
|
}
|
|
catch(Object)
|
|
{
|
|
return 0;
|
|
}
|
|
return 1;
|
|
}
|