Add test from #308 to minitests.

This commit is contained in:
Christian Kamm
2009-05-23 00:26:38 +02:00
parent 5b799deeb4
commit 2665fc4f3c

View File

@@ -0,0 +1,20 @@
extern(C) int printf(char*, ...);
long foo(ref int p) {
try { return 0; }
finally {
p++;
throw new Object;
}
}
void main() {
int p = 0;
try {
foo(p);
assert(0);
} catch {
}
printf("Number of types scope(exit) was executed : %d\n", p);
assert(p == 1);
}