You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, while loops are transformed into a for-loop with a if-then-else for the body, which does an iteration of the original loop if the original condition on the while loop holds and otherwise simply returns the current loop variable(s). This isn't quite correct: we should return the current loop variables(s) if the original condition has ever been met.
The text was updated successfully, but these errors were encountered:
I see now why you've asked about a test--this isn't actually a bug (and hence I cannot construct a test for it). I thought it might be an issue due to the bound annotations but if the while-loop's stopping condition ever holds (when it is checked) then it must continue to hold because it'll simply return the current loop variables without modification.
At the moment, while loops are transformed into a for-loop with a
if-then-else
for the body, which does an iteration of the original loop if the original condition on the while loop holds and otherwise simply returns the current loop variable(s). This isn't quite correct: we should return the current loop variables(s) if the original condition has ever been met.The text was updated successfully, but these errors were encountered: