comparison tests/mini/throw1.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/throw1.d@5071469303d4
children
comparison
equal deleted inserted replaced
340:351c0077d0b3 341:1bb99290e03a
1 module throw1;
2
3 extern(C) int rand();
4
5 class C
6 {
7 }
8
9 void func(bool b)
10 {
11 if (b)
12 throw new C;
13 }
14
15 int main()
16 {
17 bool b = true;
18 try
19 {
20 func(b);
21 }
22 catch(Object)
23 {
24 return 0;
25 }
26 return 1;
27 }