diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-13 14:40:22 +0530 |
---|---|---|
committer | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-13 14:40:22 +0530 |
commit | e6c510bbbd9fbd076a722c5b2b2626485a16b93e (patch) | |
tree | f37b30ab866f29b9e298425a9c38e7b2ecdf2c44 | |
parent | fa4644006a618924985bc95bf899b60ea73d8c94 (diff) | |
download | Nim-e6c510bbbd9fbd076a722c5b2b2626485a16b93e.tar.gz |
Check tyRange for exhaustiveness
-rw-r--r-- | compiler/semtypes.nim | 2 |
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 |