mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-08 00:14:10 +02:00
[svn r133] Fixed some problems with inlining not happening :P
Fixed problems with certain cases of deeply nested classes/functions.
This commit is contained in:
30
test/nested8.d
Normal file
30
test/nested8.d
Normal file
@@ -0,0 +1,30 @@
|
||||
module nested8;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 1;
|
||||
void func()
|
||||
{
|
||||
printf("func()\n");
|
||||
i++;
|
||||
void func2()
|
||||
{
|
||||
printf(" func2()\n");
|
||||
int j = i + 1;
|
||||
void func3()
|
||||
{
|
||||
printf(" func3()\n");
|
||||
j++;
|
||||
printf(" done = %d\n", j);
|
||||
}
|
||||
func3();
|
||||
i = j;
|
||||
printf(" done = %d\n", j);
|
||||
}
|
||||
func2();
|
||||
printf("done\n");
|
||||
}
|
||||
func();
|
||||
printf("i == %d\n", i);
|
||||
assert(i == 4);
|
||||
}
|
||||
Reference in New Issue
Block a user