summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2016-01-16 13:54:28 +0000
committerDominik Picheta <dominikpicheta@gmail.com>2016-01-16 13:54:28 +0000
commitbc65a7c76b627beef294e87bc1b1db540e4ee610 (patch)
tree710b9309c3b5971a9992100ad17f24d5f03af36f /tests/closure
parent40ae1ad3639040592877adf0b235e45d3b1785fd (diff)
downloadNim-bc65a7c76b627beef294e87bc1b1db540e4ee610.tar.gz
Added test for #1923.
Diffstat (limited to 'tests/closure')
-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