mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
(cherry picked from commit 4d76725299)
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user