From e6c510bbbd9fbd076a722c5b2b2626485a16b93e Mon Sep 17 00:00:00 2001 From: Neelesh Chandola Date: Thu, 13 Dec 2018 14:40:22 +0530 Subject: [PATCH] Check tyRange for exhaustiveness --- compiler/semtypes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 9961deee0d..d1e119de39 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -613,7 +613,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int, var chckCovered = false var typ = skipTypes(a.sons[0].typ, abstractVar-{tyTypeDesc}) case typ.kind - of tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32, tyBool: + of tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32, tyBool, tyRange: chckCovered = true of tyFloat..tyFloat128, tyString, tyError: discard