Commit 80ef344d authored by gsamain's avatar gsamain

Properly fix lock analysis occuring on non-expression nodes

parent 38f26fde
......@@ -5393,6 +5393,8 @@ class ExprStatNode(StatNode):
def analyse_expressions(self, env):
self.expr.result_is_used = False # hint that .result() may safely be left empty
self.expr = self.expr.analyse_expressions(env)
from . import ExprNodes
if isinstance(self.expr, ExprNodes.ExprNode):
self.expr.ensure_rhs_locked(env)
# Repeat in case of node replacement.
self.expr.result_is_used = False # hint that .result() may safely be left empty
......
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