Files
ldc/test/throw1.d
Tomas Lindquist Olsen 3db5b9bb98 [svn r38] * resizing dynamic arrays support
* throw is replaced with assert(0)
* catch is ignored
* better foreach support
* various bugfixes
2007-10-09 02:50:00 +02:00

27 lines
223 B
D

module throw1;
extern(C) int rand();
class C
{
}
void func()
{
if (rand() & 1)
throw new C;
}
int main()
{
try
{
func();
}
catch(Object)
{
return 1;
}
return 0;
}