From f0145ba7c5142b2ea7da8c77522600a251145875 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 1 Aug 2011 08:39:27 +0200 Subject: anonymous procs implemented; however no closure support yet --- tests/accept/compile/tnestedproc.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/accept/compile/tnestedproc.nim (limited to 'tests') diff --git a/tests/accept/compile/tnestedproc.nim b/tests/accept/compile/tnestedproc.nim new file mode 100644 index 000000000..49ec6f9a7 --- /dev/null +++ b/tests/accept/compile/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)()) + -- cgit 1.4.1-2-gfad0