Skip to content

Commit ff72e93

Browse files
Update for_helpers.py
1 parent c1f1096 commit ff72e93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ def make_for_loop_generator(
450450
def constant_fold_or_none(expr: Expression | None) -> Any:
451451
return None if expr is None else constant_fold_expr(builder, expr)
452452

453-
start = constant_fold_or_none(expr.index.start)
454-
stop = constant_fold_or_none(expr.index.stop)
455-
step = constant_fold_or_none(expr.index.step)
453+
start = constant_fold_or_none(expr.index.begin_index)
454+
stop = constant_fold_or_none(expr.index.end_index)
455+
step = constant_fold_or_none(expr.index.stride)
456456

457457
if all(s is None or isinstance(s, int) for s in (start, stop, step)):
458458
for_list.init(

0 commit comments

Comments
 (0)