bugfix: tests/reject/tnoinst.nim is now rejected properly

This commit is contained in:
Araq
2012-01-13 13:40:05 +01:00
parent 76886432da
commit e362cbbfd7
5 changed files with 27 additions and 2 deletions

16
tests/reject/tnoinst.nim Normal file
View File

@@ -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]()