Commit 314a0f1c authored by Robert Bradshaw's avatar Robert Bradshaw

tiny fix, cleanup

parent 208ba244
......@@ -1207,13 +1207,15 @@ class ExpandInplaceOperators(EnvTransform):
lhs, let_ref_nodes = side_effect_free_reference(lhs, setting=True)
except ValueError:
return node
lhs.analyse_types(env)
dup = lhs.__class__(**lhs.__dict__)
binop = binop_node(node.pos,
operator = node.operator,
operand1 = dup,
operand2 = rhs,
inplace=True)
# Manually analyse types for new node.
lhs.analyse_target_types(env)
dup.analyse_types(env)
binop.analyse_operation(env)
node = SingleAssignmentNode(
node.pos,
......@@ -1223,7 +1225,6 @@ class ExpandInplaceOperators(EnvTransform):
let_ref_nodes.reverse()
for t in let_ref_nodes:
node = LetNode(t, node)
# Manually analyse types for new node.
return node
def visit_ExprNode(self, node):
......
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