Commit ec9e1b3c authored by Stefan Behnel's avatar Stefan Behnel

fix compiler crash on none checks after in-place operations

parent c7c062c7
...@@ -711,7 +711,9 @@ class CreateControlFlowGraph(CythonTransform): ...@@ -711,7 +711,9 @@ class CreateControlFlowGraph(CythonTransform):
self.in_inplace_assignment = True self.in_inplace_assignment = True
self.visitchildren(node) self.visitchildren(node)
self.in_inplace_assignment = False self.in_inplace_assignment = False
self.mark_assignment(node.lhs, node.create_binop_node()) expr_node = node.create_binop_node()
expr_node.type = expr_node.infer_type(self.env)
self.mark_assignment(node.lhs, expr_node)
return node return node
def visit_DelStatNode(self, node): def visit_DelStatNode(self, node):
......
...@@ -113,3 +113,10 @@ def self_dependency_none(int x): ...@@ -113,3 +113,10 @@ def self_dependency_none(int x):
if x: if x:
a,b = b,a a,b = b,a
return b.get(2) return b.get(2)
#@cython.test_fail_if_path_exists('//NoneCheckNode')
def in_place_op():
vals = [0]
vals += [1]
for x in vals:
pass
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