Commit ee6194a3 authored by Stefan Behnel's avatar Stefan Behnel

prevent re-wrapping of BoolBinopNode operands

parent 7a968978
......@@ -9692,10 +9692,15 @@ class BoolBinopNode(ExprNode):
operand2 = self.operand2.analyse_types(env)
self.type = PyrexTypes.independent_spanning_type(
operand1.type, operand2.type)
self.operand1 = BoolBinopResultNode(operand1, self.type, env)
self.operand2 = BoolBinopResultNode(operand2, self.type, env)
self.operand1 = self._wrap_operand(operand1, env)
self.operand2 = self._wrap_operand(operand2, env)
return self
def _wrap_operand(self, operand, env):
if not isinstance(operand, (BoolBinopNode, BoolBinopResultNode)):
operand = BoolBinopResultNode(operand, self.type, env)
return operand
def coerce_to_boolean(self, env):
return self.coerce_to(PyrexTypes.c_bint_type, env)
......
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