Mercurial > projects > ldc
comparison test/nested8.d @ 129:8096ba7082db trunk
[svn r133] Fixed some problems with inlining not happening :P
Fixed problems with certain cases of deeply nested classes/functions.
author | lindquist |
---|---|
date | Fri, 28 Dec 2007 22:55:24 +0100 |
parents | |
children | d9d5d59873d8 |
comparison
equal
deleted
inserted
replaced
128:e5fe8521bbfa | 129:8096ba7082db |
---|---|
1 module nested8; | |
2 | |
3 void main() | |
4 { | |
5 int i = 1; | |
6 void func() | |
7 { | |
8 printf("func()\n"); | |
9 i++; | |
10 void func2() | |
11 { | |
12 printf(" func2()\n"); | |
13 int j = i + 1; | |
14 void func3() | |
15 { | |
16 printf(" func3()\n"); | |
17 j++; | |
18 printf(" done = %d\n", j); | |
19 } | |
20 func3(); | |
21 i = j; | |
22 printf(" done = %d\n", j); | |
23 } | |
24 func2(); | |
25 printf("done\n"); | |
26 } | |
27 func(); | |
28 printf("i == %d\n", i); | |
29 assert(i == 4); | |
30 } |