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

Add a return Keyword #7104

Open
Tracked by #7106
smores56 opened this issue Sep 19, 2024 · 0 comments · May be fixed by #7173
Open
Tracked by #7106

Add a return Keyword #7104

smores56 opened this issue Sep 19, 2024 · 0 comments · May be fixed by #7173
Assignees
Labels
enhancement New feature or request

Comments

@smores56
Copy link
Collaborator

Zulip discussion

In order to facilitate early returns with the new try keyword, we want to add a more general return keyword that returns to the nearest function boundary. That means usages of return in an inline closure return to the closure's boundary, not the enclosing function's boundary.

Note to the implementer: We'll need to introduce a transformation into single static assignment (SSA) form for return usages either during or right before monomorphization. Feel free to ask for help in Zulip if you need context on that.

@lukewilliamboswell lukewilliamboswell added the enhancement New feature or request label Sep 19, 2024
@smores56 smores56 self-assigned this Sep 20, 2024
@smores56 smores56 linked a pull request Oct 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants