diff options
Diffstat (limited to 'tests/closure/tnestedproc.nim')
-rw-r--r-- | tests/closure/tnestedproc.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/closure/tnestedproc.nim b/tests/closure/tnestedproc.nim new file mode 100644 index 000000000..49ec6f9a7 --- /dev/null +++ b/tests/closure/tnestedproc.nim @@ -0,0 +1,12 @@ +discard """ + output: "11" +""" + +proc p(x, y: int): int = + result = x + y + +echo p((proc (): int = + var x = 7 + return x)(), + (proc (): int = return 4)()) + |