summary refs log tree commit diff stats
path: root/tests/closure/tcodegenerr1923.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/closure/tcodegenerr1923.nim')
-rw-r--r--tests/closure/tcodegenerr1923.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/closure/tcodegenerr1923.nim b/tests/closure/tcodegenerr1923.nim
new file mode 100644
index 000000000..ee131ae15
--- /dev/null
+++ b/tests/closure/tcodegenerr1923.nim
@@ -0,0 +1,9 @@
+type
+  Foo[M] = proc() : M
+
+proc bar[M](f : Foo[M]) =
+  discard f()
+
+proc baz() : int = 42
+
+bar(baz)
\ No newline at end of file