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,7 +644,6 @@ class IterationTransform(Visitor.EnvTransform): ...@@ -644,7 +644,6 @@ class IterationTransform(Visitor.EnvTransform):
if step_value == 0: if step_value == 0:
# will lead to an error elsewhere # will lead to an error elsewhere
return node return node
if not isinstance(step, ExprNodes.IntNode):
step = ExprNodes.IntNode(step_pos, value=str(step_value), step = ExprNodes.IntNode(step_pos, value=str(step_value),
constant_result=step_value) constant_result=step_value)
......
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