Commit ba750d10 authored by Stefan Behnel's avatar Stefan Behnel

coercions should always return a new node in order to support result reuse

parent b2d2e9ce
...@@ -5627,10 +5627,13 @@ class BoolBinopNode(ExprNode): ...@@ -5627,10 +5627,13 @@ class BoolBinopNode(ExprNode):
or self.operand2.compile_time_value(denv) or self.operand2.compile_time_value(denv)
def coerce_to_boolean(self, env): def coerce_to_boolean(self, env):
self.operand1 = self.operand1.coerce_to_boolean(env) return BoolBinopNode(
self.operand2 = self.operand2.coerce_to_boolean(env) self.pos,
self.type = PyrexTypes.c_bint_type operator = self.operator,
return self operand1 = self.operand1.coerce_to_boolean(env),
operand2 = self.operand2.coerce_to_boolean(env),
type = PyrexTypes.c_bint_type,
is_temp = self.is_temp)
def analyse_types(self, env): def analyse_types(self, env):
self.operand1.analyse_types(env) self.operand1.analyse_types(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