summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-03-28 20:50:40 +0200
committerAraq <rumpf_a@web.de>2012-03-28 20:50:40 +0200
commitff3e80279b928f94fe707b23a749d12e0080bd21 (patch)
tree8eea101cb4a1a52dcf523be03aeefbb86e4d4d26 /tests/compile
parent1af0601011349f01bdd89cc24c778d82134e4333 (diff)
downloadNim-ff3e80279b928f94fe707b23a749d12e0080bd21.tar.gz
corrected the index website
Diffstat (limited to 'tests/compile')
-rw-r--r--tests/compile/tglobalforvar.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/compile/tglobalforvar.nim b/tests/compile/tglobalforvar.nim
new file mode 100644
index 000000000..9f61ebcab
--- /dev/null
+++ b/tests/compile/tglobalforvar.nim
@@ -0,0 +1,7 @@
+
+var funcs: seq[proc (): int] = @[]
+for i in 0..10:
+  funcs.add((proc (): int = return i * i))
+
+echo(funcs[3]())
+