fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
This commit is contained in:
parent
57574eaf31
commit
0510a2be0d
2 changed files with 12 additions and 0 deletions
10
tests/template/t19700.nim
Normal file
10
tests/template/t19700.nim
Normal file
|
|
@ -0,0 +1,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, `!=`)
|
||||
Loading…
Add table
Add a link
Reference in a new issue