-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[partially defined] rework handling of else in loops (#14191)
`else` in loops is executed if the loop didn't exit via a raise, return, or a break. Therefore, we should treat it execution as unconditional if there is not a break statement. This PR also improves error messages in `else`, reporting them as "may be undefined" instead of "used before definition" Fixes #14097 Co-authored-by: Ivan Levkivskyi <[email protected]>
- Loading branch information
1 parent
5795488
commit a82c288
Showing
2 changed files
with
86 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters