summary refs log tree commit diff stats
path: root/tests/reject/tnoinst.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-01-13 13:40:05 +0100
committerAraq <rumpf_a@web.de>2012-01-13 13:40:05 +0100
commite362cbbfd79f5b95ad0c7a218a3f7a35d91edbf7 (patch)
treeca39a785ce9d0d9c3c225326f81af36d8ebf7974 /tests/reject/tnoinst.nim
parent76886432dad6df8e1a381286a918381554bab08b (diff)
downloadNim-e362cbbfd79f5b95ad0c7a218a3f7a35d91edbf7.tar.gz
bugfix: tests/reject/tnoinst.nim is now rejected properly
Diffstat (limited to 'tests/reject/tnoinst.nim')
-rw-r--r--tests/reject/tnoinst.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/reject/tnoinst.nim b/tests/reject/tnoinst.nim
new file mode 100644
index 000000000..23a4145e0
--- /dev/null
+++ b/tests/reject/tnoinst.nim
@@ -0,0 +1,16 @@
+discard """
+  line: 12
+  errormsg: "instantiate 'notConcrete' explicitely"
+"""
+
+proc wrap[T]() =
+  proc notConcrete[T](x, y: int): int =
+    var dummy: T
+    result = x - y
+
+  var x: proc (x, y: T): int
+  x = notConcrete
+  
+
+wrap[int]()
+