Commit d1dc1a62 authored by gsamain's avatar gsamain

Handle correctly lock analysis in comparison expressions

parent 981572f1
......@@ -12964,6 +12964,12 @@ class PrimaryCmpNode(ExprNode, CmpNode):
else:
return self.operand1.check_const() and self.operand2.check_const()
def ensure_subexpr_rhs_locked(self, env):
self.operand1.ensure_rhs_locked(env)
self.operand2.ensure_rhs_locked(env)
if self.cascade:
self.cascade.ensure_rhs_locked(env)
def calculate_result_code(self):
operand1, operand2 = self.operand1, self.operand2
if operand1.type.is_complex:
......@@ -13075,6 +13081,11 @@ class CascadedCmpNode(Node, CmpNode):
# if self.cascade:
# self.cascade.check_rhs_locked(env)
def ensure_rhs_locked(self, env):
self.operand2.ensure_rhs_locked(env)
if self.cascade:
self.cascade.ensure_rhs_locked(env)
def analyse_types(self, env):
self.operand2 = self.operand2.analyse_types(env)
if self.cascade:
......
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