make typeToString sane for sequence again
This commit is contained in:
parent
fb863a147a
commit
84f0a33bf0
2 changed files with 2 additions and 2 deletions
|
|
@ -430,7 +430,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
|
||||||
result = ""
|
result = ""
|
||||||
if t == nil: return
|
if t == nil: return
|
||||||
if prefer in preferToResolveSymbols and t.sym != nil and
|
if prefer in preferToResolveSymbols and t.sym != nil and
|
||||||
sfAnon notin t.sym.flags:
|
sfAnon notin t.sym.flags and t.kind != tySequence:
|
||||||
if t.kind == tyInt and isIntLit(t):
|
if t.kind == tyInt and isIntLit(t):
|
||||||
result = t.sym.name.s & " literal(" & $t.n.intVal & ")"
|
result = t.sym.name.s & " literal(" & $t.n.intVal & ")"
|
||||||
elif t.kind == tyAlias and t.sons[0].kind != tyAlias:
|
elif t.kind == tyAlias and t.sons[0].kind != tyAlias:
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ discard """
|
||||||
proc fun0[T1: int | float |
|
proc fun0[T1: int | float |
|
||||||
object | array | seq](a1: T1; a2: int)
|
object | array | seq](a1: T1; a2: int)
|
||||||
first type mismatch at position: 1
|
first type mismatch at position: 1
|
||||||
required type: T1: int or float or object or array or seq
|
required type: T1: int or float or object or array or seq[T]
|
||||||
but expression 'byte(1)' is of type: byte
|
but expression 'byte(1)' is of type: byte
|
||||||
|
|
||||||
expression: fun0(byte(1), 0)
|
expression: fun0(byte(1), 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue