texplicitgenericcountverbose.nim 689 B

1234567891011121314151617181920212223
  1. discard """
  2. cmd: "nim check $file"
  3. """
  4. proc foo[T, U](x: T, y: U): (T, U) = (x, y)
  5. let x = foo[int](1, 2) #[tt.Error
  6. ^ type mismatch: got <int literal(1), int literal(2)>
  7. but expected one of:
  8. proc foo[T, U](x: T; y: U): (T, U)
  9. first type mismatch at position: 2 in generic parameters
  10. missing generic parameter: U
  11. expression: foo[int](1, 2)]#
  12. let y = foo[int, float, string](1, 2) #[tt.Error
  13. ^ type mismatch: got <int literal(1), int literal(2)>
  14. but expected one of:
  15. proc foo[T, U](x: T; y: U): (T, U)
  16. first type mismatch at position: 3 in generic parameters
  17. extra generic param given
  18. expression: foo[int, float, string](1, 2)]#