t16654.nim 293 B

12345678910111213
  1. discard """
  2. cmd: "nim check $options $file"
  3. errormsg: "type mismatch: got <int literal(1), proc (r: GenericParam): auto>"
  4. """
  5. when true: # bug #16654
  6. func fn[T](a: T, op: proc(a: T): float) = discard
  7. proc main() =
  8. let v = 1
  9. proc bar(r: auto): auto = v
  10. fn(1, bar)
  11. main()