diff --git a/tests/mini/nested20.d b/tests/mini/nested20.d new file mode 100644 index 00000000..39e6f99f --- /dev/null +++ b/tests/mini/nested20.d @@ -0,0 +1,17 @@ +extern(C) int printf(char*, ...); + +void main() +{ + int[] arr = [1]; + foreach(s; arr) + { + void foo() + { + printf("n %d\n", s); + } + + printf("o1 %d\n", s); + foo(); + printf("o2 %d\n", s); + } +}