Mercurial > projects > ldc
diff test/nested10.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 | 25fa34e899e9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/nested10.d Fri Dec 28 22:55:24 2007 +0100 @@ -0,0 +1,20 @@ +module nested10; + +void main() +{ + int j = 3; + void F() + { + int i = j; + printf("F: i = %d, j = %d\n", i, j); + void G() + { + printf("G: i = %d, j = %d\n", i, j); + j += i; + } + G(); + } + F(); + printf("6 = %d\n", j); + assert(j == 6); +}