summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-10-13 01:59:20 +0200
committerAraq <rumpf_a@web.de>2012-10-13 01:59:20 +0200
commitffcbe19cd8db0fa5a5538759c6b41cd29b6d2a38 (patch)
tree6e72433229816758f47f197b06178d45b62dab5a /tests/compile
parent2193460ea6ecd9b2ee3858fffcadd2635f828f9a (diff)
downloadNim-ffcbe19cd8db0fa5a5538759c6b41cd29b6d2a38.tar.gz
fixes #217
Diffstat (limited to 'tests/compile')
-rw-r--r--tests/compile/tprocvars.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/compile/tprocvars.nim b/tests/compile/tprocvars.nim
new file mode 100644
index 000000000..dc7592526
--- /dev/null
+++ b/tests/compile/tprocvars.nim
@@ -0,0 +1,6 @@
+proc doSomething(v: Int, x: proc(v:Int):Int): Int = return x(v)
+proc doSomething(v: Int, x: proc(v:Int)) = x(v)
+
+
+echo doSomething(10, proc(v: Int): Int = return v div 2)
+