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

Closed
Tracked by #7106
smores56 opened this issue Sep 19, 2024 · 0 comments · Fixed by #7173
Closed
Tracked by #7106

Add a return Keyword #7104

smores56 opened this issue Sep 19, 2024 · 0 comments · 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.

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