t5167_4.nim 290 B

123456789101112131415161718192021
  1. discard """
  2. errormsg: "type mismatch: got <proc [*missing parameters*](x: int) | proc (x: string){.gcsafe.}>"
  3. line: 19
  4. """
  5. type
  6. TGeneric[T] = object
  7. x: int
  8. proc foo[B](x: int) =
  9. echo "foo1"
  10. proc foo(x: string) =
  11. echo "foo2"
  12. proc bar(x: proc (x: int)) =
  13. echo "bar"
  14. bar foo