Commit 3ae163a6 authored by Stefan Behnel's avatar Stefan Behnel

fix crash with starred assignments where IndexNode generated for type...

fix crash with starred assignments where IndexNode generated for type inference ended up being visited
parent 407195bd
......@@ -778,10 +778,10 @@ class ControlFlowAnalysis(CythonTransform):
self.flow.mark_assignment(lhs, rhs, entry)
elif lhs.is_sequence_constructor:
for i, arg in enumerate(lhs.args):
if arg.is_starred:
item_node = object_expr
if not rhs or arg.is_starred:
item_node = None
else:
item_node = rhs.inferable_item_node(i) if rhs else None
item_node = rhs.inferable_item_node(i)
self.mark_assignment(arg, item_node)
else:
self._visit(lhs)
......
......@@ -62,10 +62,10 @@ class MarkParallelAssignments(EnvTransform):
elif isinstance(lhs, ExprNodes.SequenceNode):
for i, arg in enumerate(lhs.args):
if arg.is_starred:
item_node = object_expr
if not rhs or arg.is_starred:
item_node = None
else:
item_node = rhs.inferable_item_node(i) if rhs else None
item_node = rhs.inferable_item_node(i)
self.mark_assignment(arg, item_node)
else:
# Could use this info to infer cdef class attributes...
......
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