Skip to content

Fix handling of @use and @consume in class parameters #23342

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 4 commits into from
Jun 11, 2025

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 10, 2025

Multiple fixes, both to keep the annotations in place for capture checking, and to consult them
when we do leak checking.

Fixes #23303

odersky added 4 commits June 10, 2025 15:19
Needed so that markFree can get there to check reach capabilities
Needed so that markFree can get to where it needs to check reach capabilities of classes.
pathRoot overshoots, selects `this` as the root of `this.param`.
@odersky odersky requested a review from Linyxus June 10, 2025 16:20
Copy link
Contributor

@Linyxus Linyxus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Linyxus Linyxus assigned odersky and unassigned Linyxus Jun 11, 2025
@odersky odersky merged commit eb1a0af into scala:main Jun 11, 2025
44 of 50 checks passed
@odersky odersky deleted the fix-23303 branch June 11, 2025 07:42
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.

Leaking reach capabilities for class parameters
2 participants