t8434.nim 438 B

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