Commit e4f3075d authored by Stefan Behnel's avatar Stefan Behnel

always create a new IntNode for the step value in iter-range optimisation as...

always create a new IntNode for the step value in iter-range optimisation as we overwrite its value later
parent 9787c5dc
......@@ -644,9 +644,8 @@ class IterationTransform(Visitor.EnvTransform):
if step_value == 0:
# will lead to an error elsewhere
return node
if not isinstance(step, ExprNodes.IntNode):
step = ExprNodes.IntNode(step_pos, value=str(step_value),
constant_result=step_value)
step = ExprNodes.IntNode(step_pos, value=str(step_value),
constant_result=step_value)
if len(args) == 1:
bound1 = ExprNodes.IntNode(range_function.pos, value='0',
......
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