fix(interpreter): wrong condition in indefinite for loop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user