Mercurial > projects > ldc
comparison test/throw1.d @ 100:5071469303d4 trunk
[svn r104] TONS OF FIXES.
Split up declaration, constant initializer gen and definition for globals, structs, classes and functions.
Improved ClassInfo support (not complete), not in vtable yet.
Fixed a bunch of forward reference problems.
Much more. Major commit! :)
author | lindquist |
---|---|
date | Fri, 16 Nov 2007 08:21:47 +0100 |
parents | 4648206ca213 |
children |
comparison
equal
deleted
inserted
replaced
99:a676a7743642 | 100:5071469303d4 |
---|---|
4 | 4 |
5 class C | 5 class C |
6 { | 6 { |
7 } | 7 } |
8 | 8 |
9 void func() | 9 void func(bool b) |
10 { | 10 { |
11 if (rand() & 1) | 11 if (b) |
12 throw new C; | 12 throw new C; |
13 } | 13 } |
14 | 14 |
15 int main() | 15 int main() |
16 { | 16 { |
17 bool b = true; | |
17 try | 18 try |
18 { | 19 { |
19 func(); | 20 func(b); |
20 } | 21 } |
21 catch(Object) | 22 catch(Object) |
22 { | 23 { |
23 return 1; | 24 return 1; |
24 } | 25 } |