fixes #20031; uint64 is an ordinal type since 1.0 (#20094)

* fixes #20031; uint64 is an ordinal type since 1.0

* Update compiler/semstmts.nim
This commit is contained in:
ringabout
2022-07-27 17:15:51 +08:00
committed by GitHub
parent 4c46358db1
commit 5bbc5edf43
2 changed files with 12 additions and 1 deletions

View File

@@ -1050,7 +1050,7 @@ proc semCase(c: PContext, n: PNode; flags: TExprFlags): PNode =
var typ = commonTypeBegin
var hasElse = false
let caseTyp = skipTypes(n[0].typ, abstractVar-{tyTypeDesc})
const shouldChckCovered = {tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32, tyBool}
const shouldChckCovered = {tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt64, tyBool}
case caseTyp.kind
of shouldChckCovered:
chckCovered = true