bugfix: bool for case statements

This commit is contained in:
Araq
2014-05-06 21:03:05 +02:00
parent 1549bed82f
commit bdb2d21f27

View File

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