Commit bd9de292 authored by Stefan Behnel's avatar Stefan Behnel

Fix: overwrite target node after analysis.

parent 22891e07
......@@ -4951,7 +4951,7 @@ class PyClassDefNode(ClassDefNode):
self.class_result = self.class_result.analyse_expressions(env)
cenv = self.scope
self.body = self.body.analyse_expressions(cenv)
self.target.analyse_target_expression(env, self.classobj)
self.target = self.target.analyse_target_expression(env, self.classobj)
self.class_cell = self.class_cell.analyse_expressions(cenv)
return self
......
......@@ -2446,8 +2446,8 @@ class ExpandInplaceOperators(EnvTransform):
operand2 = rhs,
inplace=True)
# Manually analyse types for new node.
lhs.analyse_target_types(env)
dup.analyse_types(env)
lhs = lhs.analyse_target_types(env)
dup.analyse_types(env) # FIXME: no need to reanalyse the copy, right?
binop.analyse_operation(env)
node = Nodes.SingleAssignmentNode(
node.pos,
......
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