mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
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! :)
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 1;
|
|
}
|
|
return 0;
|
|
}
|