t8434.nim 445 B

1234567891011121314151617
  1. discard """
  2. errormsg: "type mismatch: got <byte, int literal(0)>"
  3. nimout: '''but expected one of:
  4. proc fun0[T1: int | float |
  5. object | array | seq](a1: T1; a2: int)
  6. first type mismatch at position: 1
  7. required type for a1: T1: int or float or object or array or seq[T]
  8. but expression 'byte(1)' is of type: byte
  9. expression: fun0(byte(1), 0)
  10. '''
  11. """
  12. proc fun0[T1:int|float|object|array|seq](a1:T1, a2:int)=discard
  13. fun0(byte(1), 0)