fixes #8434 (incomplete info in errmsg about 'required type') (#8441)

This commit is contained in:
skilchen 2018-07-30 10:41:59 +02:00 • committed by Andreas Rumpf
commit becb6743f8
2 changed files with 24 additions and 2 deletions

16
tests/errmsgs/t8434.nim Normal file
View file

@ -0,0 +1,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
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)