summary refs log tree commit diff stats
path: root/tests/accept
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-08-01 08:39:27 +0200
committerAraq <rumpf_a@web.de>2011-08-01 08:39:27 +0200
commitf0145ba7c5142b2ea7da8c77522600a251145875 (patch)
tree9450f572e5e1588a3fc330c5d61a715b3458042c /tests/accept
parent00a4e19e8fe7e0cb02d77523989803591dd6d5cf (diff)
downloadNim-f0145ba7c5142b2ea7da8c77522600a251145875.tar.gz
anonymous procs implemented; however no closure support yet
Diffstat (limited to 'tests/accept')
-rw-r--r--tests/accept/compile/tnestedproc.nim12
1 files changed, 12 insertions, 0 deletions
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)())
+