summary refs log tree commit diff stats
path: root/tests/template/t19700.nim
blob: cc29449446099f089b38b1917526ed242df6230a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
discard """
  errormsg: "type mismatch: got <Obj, Obj, template (x: untyped, y: untyped): untyped>"
"""

type Obj = object

proc apply[T, R](a, b: T; f: proc(x, y: T): R): R = f(a, b)

let a, b = Obj()
discard apply(a, b, `!=`)