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,
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):