Check tyRange for exhaustiveness

This commit is contained in:
Neelesh Chandola 2018-12-13 14:40:22 +05:30
commit e6c510bbbd

View file

@ -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