-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Can't return from inside a block #270
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
Comments
This translates now, but incorrectly, acting like a continue statement. |
Here's a code example that reproduces it:
The problem is that the ret inside the for-each loop is returning from the closure that trans generates automatically for the loop body, not from foo. That's why it acts like a continue. I was going to try fixing this, but it's not obvious to me how to (there's no other case when you're returning from more than one nested scope at once), so I'm changing it back to unassigned. |
Iterators are out. Rewording the bug title to apply to blocks. |
Duplicated (in much more detail) by #1619, closing. |
Document the <=0x7F restriction on \x escapes.
…ng#270) repo-filter does not produce consistent SHA hashes. While we were aware of this, we hadn't realized that this made incremental non-interactive updates of the branch a matter of luck as git may or may not be able to automatically resolve conflicts. (It worked for the update to 2025-02-10, but failed for the next one.) git-subtree-split does produce consistent SHA hashes, but the native `git-subtree-split` implementation is a shell script, and thus was found to be too slow (which is why we chose repo-filter in the first place). splitsh-lite is an implementation of just the `subtree split` command in Go and libgit2. This makes `subtree split` even faster than `repo-filter` at 35 seconds vs 50 seconds (on a GitHub runner). By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
…g#288) This restores a fix from rust-lang#250 that was deemed no longer necessary with the move to subtree split (in rust-lang#270), but this proved to be wrong. (See model-checking@ab648fe for such an example of an unintended change.) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. Co-authored-by: thanhnguyen-aws <[email protected]>
iterFunc({|| ret; })
does not return from the outer function.Maybe we'll just have accept this, since in the absence of non-local control flow, there's no nice way to implement such returns.
The text was updated successfully, but these errors were encountered: