summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorNeelesh Chandola <neelesh.chandola@outlook.com>2018-12-13 14:40:22 +0530
committerNeelesh Chandola <neelesh.chandola@outlook.com>2018-12-13 14:40:22 +0530
commite6c510bbbd9fbd076a722c5b2b2626485a16b93e (patch)
treef37b30ab866f29b9e298425a9c38e7b2ecdf2c44
parentfa4644006a618924985bc95bf899b60ea73d8c94 (diff)
downloadNim-e6c510bbbd9fbd076a722c5b2b2626485a16b93e.tar.gz
Check tyRange for exhaustiveness
-rw-r--r--compiler/semtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 9961deee0..d1e119de3 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