summary refs log tree commit diff stats
path: root/tests/errmsgs/t8434.nim
blob: b374681119ca9b46ab2d6e250c6df66d1c7d8de4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  errormsg: "type mismatch: got <byte, int literal(0)>"
  nimout: '''but expected one of:
proc fun0[T1: int | float |
    object | array | seq](a1: T1; a2: int)
  first type mismatch at position: 1
  required type: T1: int or float or object or array or seq[T]
  but expression 'byte(1)' is of type: byte

expression: fun0(byte(1), 0)
'''
"""

proc fun0[T1:int|float|object|array|seq](a1:T1, a2:int)=discard

fun0(byte(1), 0)