Commit 42479768 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Properly fix lock analysis occuring on non-expression nodes

parent baeca09d
......@@ -5610,7 +5610,9 @@ 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)
self.expr.ensure_rhs_locked(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
return self
......
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