# HG changeset patch # User Christian Kamm # Date 1243031198 -7200 # Node ID f9285cf14c0d77519f07edbbdcecc735c9136811 # Parent 3f5ea912149d5140cb7cb29a67da8b5a9ff609db Add test from #308 to minitests. diff -r 3f5ea912149d -r f9285cf14c0d tests/mini/bug308_double_finally.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/mini/bug308_double_finally.d Sat May 23 00:26:38 2009 +0200 @@ -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); +} \ No newline at end of file