bugfix: bool for case statements

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

View file

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