diff options
author | Bung <crc32@qq.com> | 2020-07-27 20:06:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 14:06:54 +0200 |
commit | 191c388792c1b57c3855e9c3b9c83293be8a6207 (patch) | |
tree | 782dd26e106fd718b47a5162cb71a0436891daf5 | |
parent | 947ecd1257f78e8ee723bf3a6806b8f24642a064 (diff) | |
download | Nim-191c388792c1b57c3855e9c3b9c83293be8a6207.tar.gz |
fixes #14189 (#15080) [backport]
-rw-r--r-- | compiler/semtypes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 4001953bc..588a0f4f6 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -670,7 +670,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int, case typ.kind of shouldChckCovered: chckCovered = true - of tyFloat..tyFloat128, tyString, tyError: + of tyFloat..tyFloat128, tyError: discard of tyRange: if skipTypes(typ[0], abstractInst).kind in shouldChckCovered: @@ -678,7 +678,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int, of tyForward: errorUndeclaredIdentifier(c, n[0].info, typ.sym.name.s) elif not isOrdinalType(typ): - localError(c.config, n[0].info, "selector must be of an ordinal type, float or string") + localError(c.config, n[0].info, "selector must be of an ordinal type, float") if firstOrd(c.config, typ) != 0: localError(c.config, n.info, "low(" & $a[0].sym.name.s & ") must be 0 for discriminant") |