tgenericmismatchsegfault.nim 384 B

1234567891011121314
  1. discard """
  2. matrix: "-d:testsConciseTypeMismatch"
  3. """
  4. template v[T](c: SomeOrdinal): T = T(c)
  5. discard v[int, char]('A') #[tt.Error
  6. ^ type mismatch
  7. Expression: v[int, char]('A')
  8. [1] 'A': char
  9. Expected one of (first mismatch at [position]):
  10. [2] template v[T](c: SomeOrdinal): T
  11. generic parameter mismatch, expected SomeOrdinal but got 'char' of type: char]#