mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
bugfix: tests/reject/tnoinst.nim is now rejected properly
This commit is contained in:
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]()
|
||||
|
||||
Reference in New Issue
Block a user