bugfix: tests/reject/tnoinst.nim is now rejected properly
This commit is contained in:
parent
76886432da
commit
e362cbbfd7
5 changed files with 27 additions and 2 deletions
16
tests/reject/tnoinst.nim
Normal file
16
tests/reject/tnoinst.nim
Normal 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]()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue