summary refs log tree commit diff stats
path: root/tests/misc/tnoinst.nim
blob: db1058d09e25d6da951e821a1dc56de10ae206fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  line: 12
  errormsg: "instantiate 'notConcrete' explicitly"
"""

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