mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
bugfix: bool for case statements
This commit is contained in:
@@ -190,7 +190,7 @@ proc semCase(c: PContext, n: PNode): PNode =
|
||||
var typ = commonTypeBegin
|
||||
var hasElse = false
|
||||
case skipTypes(n.sons[0].typ, abstractVarRange-{tyTypeDesc}).kind
|
||||
of tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32:
|
||||
of tyInt..tyInt64, tyChar, tyEnum, tyUInt..tyUInt32, tyBool:
|
||||
chckCovered = true
|
||||
of tyFloat..tyFloat128, tyString, tyError:
|
||||
discard
|
||||
|
||||
Reference in New Issue
Block a user