diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-02-25 19:00:52 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-25 19:01:01 +0100 |
commit | 84f0a33bf0b0dc040c97205914d0b03c16e7c71a (patch) | |
tree | a2102f2b1db5ced82e1ec908d86ae94e9202357c | |
parent | fb863a147a79ab36306f884921b6693141a12870 (diff) | |
download | Nim-84f0a33bf0b0dc040c97205914d0b03c16e7c71a.tar.gz |
make typeToString sane for sequence again
-rw-r--r-- | compiler/types.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/t8434.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index 0e2c3b651..86e5e756a 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -430,7 +430,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string = result = "" if t == nil: return 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): result = t.sym.name.s & " literal(" & $t.n.intVal & ")" elif t.kind == tyAlias and t.sons[0].kind != tyAlias: diff --git a/tests/errmsgs/t8434.nim b/tests/errmsgs/t8434.nim index 60fe2e2df..b37468111 100644 --- a/tests/errmsgs/t8434.nim +++ b/tests/errmsgs/t8434.nim @@ -4,7 +4,7 @@ discard """ 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 + 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) |