Skip to content

Backport "Improve checking LHS of Assign" to 3.3 LTS #410

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented May 12, 2025

Backports scala#22977 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

Fixes scala#22970

Simple example showing how awkward this is compared to a traversal,
where there is more control when descending.

Previously, it "ignored" the LHS of Assign to avoid taking `x = y` as
ref to `x` instead of assignment to.

Now, "mark" the LHS as assignment, so `transformIdent` and `Select` set
a "mode" flag, such that `x` is correctly taken as either a ref or
assign to `x`.

Probably there is more complex syntax to handle as LHS, but I haven't
had coffee yet.
[Cherry-picked 9bee756]
Base automatically changed from backport-lts-3.3-22982 to lts-3.3 May 13, 2025 12:38
@tgodzik
Copy link
Author

tgodzik commented May 13, 2025

No regressions detected in the community build up to backport-lts-3.3-23124.

Reference

@tgodzik tgodzik merged commit 6f4a98f into lts-3.3 May 13, 2025
22 checks passed
@tgodzik tgodzik deleted the backport-lts-3.3-22977 branch May 13, 2025 12:38
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.

2 participants