[svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.

Changed: Renamed all the LLVM_Dto... helper function to just Dto...
This commit is contained in:
Tomas Lindquist Olsen
2007-11-01 17:27:18 +01:00
parent 947bba2b48
commit 6bb534fb2a
11 changed files with 616 additions and 557 deletions

27
test/scope5.d Normal file
View File

@@ -0,0 +1,27 @@
module scope5;
int i;
void func(int a, int b)
{
i = 0;
{
scope(exit) i++;
if (a) {
scope(exit) i++;
if (b) return;
i++;
}
}
i++;
}
void main()
{
func(0,0);
assert(i == 2);
func(1,1);
assert(i == 2);
func(1,0);
assert(i == 4);
}