Files
ldc/tests/mini/throw1.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;
}