Commit 719e6816 authored by Stefan Behnel's avatar Stefan Behnel

fix switch transform after changing boolean coercion of integer expressions

parent 9fc211eb
...@@ -778,7 +778,8 @@ class SwitchTransform(Visitor.VisitorTransform): ...@@ -778,7 +778,8 @@ class SwitchTransform(Visitor.VisitorTransform):
def extract_conditions(self, cond, allow_not_in): def extract_conditions(self, cond, allow_not_in):
while True: while True:
if isinstance(cond, ExprNodes.CoerceToTempNode): if isinstance(cond, (ExprNodes.CoerceToTempNode,
ExprNodes.CoerceToBooleanNode)):
cond = cond.arg cond = cond.arg
elif isinstance(cond, UtilNodes.EvalWithTempExprNode): elif isinstance(cond, UtilNodes.EvalWithTempExprNode):
# this is what we get from the FlattenInListTransform # this is what we get from the FlattenInListTransform
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment