Files
Nim/tests/template/t19700.nim
Bung 0510a2be0d fix #19700 Crash when passing a template to a generic functio… (#20567)
fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
2022-10-15 07:15:58 +02:00

11 lines
228 B
Nim

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, `!=`)