Skip to content

Revert #22632 "Do semantic under nested scope when returning inside foreach body"#22694

Open
IDONTUSEGH wants to merge 1 commit intodlang:masterfrom
IDONTUSEGH:revert-pr-22632
Open

Revert #22632 "Do semantic under nested scope when returning inside foreach body"#22694
IDONTUSEGH wants to merge 1 commit intodlang:masterfrom
IDONTUSEGH:revert-pr-22632

Conversation

@IDONTUSEGH
Copy link
Contributor

This reverts commit ac92d7d.

This PR causes issues with -betterC #22639

@IDONTUSEGH IDONTUSEGH requested a review from ibuclaw as a code owner March 5, 2026 08:06
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @IDONTUSEGH! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22694"

@ibuclaw
Copy link
Member

ibuclaw commented Mar 5, 2026

Out of respect, please ping the author so they have time to review their original work before we consider throwing it out.

cc @limepoutine

@IDONTUSEGH
Copy link
Contributor Author

Sorry, I put this PR too hastily!

@limepoutine
Copy link
Contributor

limepoutine commented Mar 5, 2026

It's OK, please also consider reverting #22620. Use construction for returning __result won't work until semantic order is fixed (#22685, but even that would be sort of hackish). Leaving it broken is better than introducing a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants