parent
05e8a60bb4
commit
4d76725299
1 changed files with 12 additions and 0 deletions
12
tests/errmsgs/t16654.nim
Normal file
12
tests/errmsgs/t16654.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
discard """
|
||||||
|
cmd: "nim check $options $file"
|
||||||
|
errormsg: "type mismatch: got <int> but expected 'float'"
|
||||||
|
"""
|
||||||
|
|
||||||
|
when true: # bug #16654
|
||||||
|
func fn[T](a: T, op: proc(a: T): float) = discard
|
||||||
|
proc main() =
|
||||||
|
let v = 1
|
||||||
|
proc bar(r: auto): auto = v
|
||||||
|
fn(1, bar)
|
||||||
|
main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue