Commit 93f66902 authored by Stefan Behnel's avatar Stefan Behnel

always wrap for-iterator node in NextNode after analysing it (might have been replaced)

parent 4b6385ce
......@@ -5599,8 +5599,7 @@ class ForInStatNode(LoopNode, StatNode):
# looked up in the outer scope
iterator_env = NonLocalScopeWrapper(iterator_env)
self.iterator = self.iterator.analyse_expressions(iterator_env)
if self.item is None:
# Hack. Sometimes analyse_declarations not called.
# rewrap in NextNode
import ExprNodes
self.item = ExprNodes.NextNode(
self.iterator, lives_in_outer_scope=self.first_in_genexp)
......
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