Commit f7768620 authored by Stefan Behnel's avatar Stefan Behnel

fix temp var leak in for-range to for-from transformation

parent 0a3b736e
...@@ -3971,6 +3971,8 @@ class ForFromStatNode(LoopNode, StatNode): ...@@ -3971,6 +3971,8 @@ class ForFromStatNode(LoopNode, StatNode):
# depend on whether or not the loop is a python type. # depend on whether or not the loop is a python type.
self.py_loopvar_node.generate_evaluation_code(code) self.py_loopvar_node.generate_evaluation_code(code)
self.target.generate_assignment_code(self.py_loopvar_node, code) self.target.generate_assignment_code(self.py_loopvar_node, code)
if from_range:
code.funcstate.release_temp(loopvar_name)
break_label = code.break_label break_label = code.break_label
code.set_loop_labels(old_loop_labels) code.set_loop_labels(old_loop_labels)
if self.else_clause: if self.else_clause:
......
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