From 314a0f1c19957da97d1294b126cd3b7021731954 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 14 Nov 2010 00:08:49 -0800 Subject: [PATCH] tiny fix, cleanup --- Cython/Compiler/ParseTreeTransforms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 1530c0c9..ae5bb142 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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): -- 2.26.2