From e79e0616b19eeae1a243a55cbbf9507756ba798b Mon Sep 17 00:00:00 2001 From: Bung Date: Mon, 27 Jul 2020 20:06:54 +0800 Subject: [PATCH] fixes #14189 (#15080) [backport] (cherry picked from commit 191c388792c1b57c3855e9c3b9c83293be8a6207) --- compiler/semtypes.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index f4a9661690..341826300b 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -626,7 +626,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.sons[0], abstractInst).kind in shouldChckCovered: @@ -634,7 +634,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int, of tyForward: errorUndeclaredIdentifier(c, n.sons[0].info, typ.sym.name.s) elif not isOrdinalType(typ): - localError(c.config, n.sons[0].info, "selector must be of an ordinal type, float or string") + localError(c.config, n.sons[0].info, "selector must be of an ordinal type or float") if firstOrd(c.config, typ) != 0: localError(c.config, n.info, "low(" & $a.sons[0].sym.name.s & ") must be 0 for discriminant")