summary refs log tree commit diff stats
path: root/tests/reject/tprocvar.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-06-26 20:17:19 +0200
committerAraq <rumpf_a@web.de>2011-06-26 20:17:19 +0200
commite25384db8907f846f3c053379cf5b431c4d28760 (patch)
tree73f9fcb73ff0b849805077e17889111314d1bf56 /tests/reject/tprocvar.nim
parentc9d21164beef5850b8c3ebb4faf70b59139644d4 (diff)
downloadNim-e25384db8907f846f3c053379cf5b431c4d28760.tar.gz
improvements to get code size down for programs that don't use GC
Diffstat (limited to 'tests/reject/tprocvar.nim')
-rw-r--r--tests/reject/tprocvar.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/reject/tprocvar.nim b/tests/reject/tprocvar.nim
new file mode 100644
index 000000000..56f76c613
--- /dev/null
+++ b/tests/reject/tprocvar.nim
@@ -0,0 +1,18 @@
+discard """
+  errormsg: "type mismatch"
+  line: 17
+  file: "tprocvar.nim"
+"""
+
+type
+  TCallback = proc (a, b: int)
+
+proc huh(x, y: var int) =
+  x = 0
+  y = x+1
+
+proc so(c: TCallback) =
+  c(2, 4)
+  
+so(huh)
+