tprevent_double_bind.nim 393 B

12345678910111213141516171819202122
  1. discard """
  2. errormsg: "type mismatch: got <TT[seq[string]], proc (v: int){.gcsafe, locks: 0.}>"
  3. line: 20
  4. """
  5. # bug #6732
  6. import typetraits
  7. type
  8. TT[T] = ref object of RootObj
  9. val: T
  10. CB[T] = proc (v: T)
  11. proc testGeneric[T](val: TT[T], cb: CB[T]) =
  12. echo val.type.name
  13. echo $val.val
  14. var tt = new(TT[seq[string]])
  15. echo tt.type.name
  16. tt.testGeneric( proc (v: int) =
  17. echo $v )