fix(interpreter): wrong condition in indefinite for loop

This commit is contained in:
2026-02-07 02:14:00 +01:00
parent 7e426ab070
commit 25ad390d8f

View File

@@ -265,7 +265,7 @@ class Interpreter(Expr.Visitor[Any], Stmt.Visitor[None]):
def condition() -> bool:
if end_value is None:
return False
return True
match (step_value < 0, inclusive):
case (False, False):
return value < end_value