summary refs log tree commit diff stats
path: root/tests/proc/tprocvarmismatch.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/proc/tprocvarmismatch.nim')
-rw-r--r--tests/proc/tprocvarmismatch.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/proc/tprocvarmismatch.nim b/tests/proc/tprocvarmismatch.nim
new file mode 100644
index 000000000..4d6be9be6
--- /dev/null
+++ b/tests/proc/tprocvarmismatch.nim
@@ -0,0 +1,18 @@
+discard """
+  errormsg: "type mismatch"
+  line: 17
+  file: "tprocvarmismatch.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)
+