Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skipped try-then clauses on return, break and continue statements #2853

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

mfelsche
Copy link
Contributor

@mfelsche mfelsche commented Aug 6, 2018

then clauses could be skipped if the containing try expression was within a loop and the body or else clause contained a continue or break statements. Also if the try was somehow nested into another try and the body or else clause contained a return the then clause was skipped.

This has been solved by going up the AST and searching for all then clauses to generate.

fixes #2843

@jemc jemc added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Aug 8, 2018
@jemc jemc merged commit 5c85dd2 into master Aug 8, 2018
@jemc jemc deleted the try-then-skipped branch August 8, 2018 20:08
ponylang-main added a commit that referenced this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested try with return ignores outer then
2 participants