bugfix: bool for case statements
This commit is contained in:
parent
1549bed82f
commit
bdb2d21f27
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ proc semCase(c: PContext, n: PNode): PNode =
|
||||||
var typ = commonTypeBegin
|
var typ = commonTypeBegin
|
||||||
var hasElse = false
|
var hasElse = false
|
||||||
case skipTypes(n.sons[0].typ, abstractVarRange-{tyTypeDesc}).kind
|
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
|
chckCovered = true
|
||||||
of tyFloat..tyFloat128, tyString, tyError:
|
of tyFloat..tyFloat128, tyString, tyError:
|
||||||
discard
|
discard
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue