Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Level checking: distinguish between certain capset vars with same owner #24077

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
odersky merged 2 commits into scala:main from dotty-staging:fix-24039
Sep 26, 2025

Conversation

Copy link
Contributor

@odersky odersky commented Sep 25, 2025

A capset var that is defined in the result type of a val or def cannot accept any
capabilities defined on the RHS. By contrast, a capset defined in the RHS (but not
in local definitions of the RHS) can accept other capabilities defined in that RHS.
Both of these capsets have the same owner, so we need an additional piece of information
to perform level checking correctly.

Fixes #24039.

He-Pin reacted with rocket emoji
A capset var that is defined in the result type of a val or def cannot accept any
capabilities defined on the RHS. By contrast, a capset defined in the RHS (but not
in local definitions of the RHS) can accept other capabilities defined in that RHS.
Both of these capsets have the same owner, so we need an additional piece of information
to perform level checking correctly.
Fixes scala#24039.
Copy link
Contributor Author

odersky commented Sep 25, 2025

@bracevac Can you check that the test files you created are handled correctly now?

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!

@odersky odersky merged commit 0ec9468 into scala:main Sep 26, 2025
50 checks passed
@odersky odersky deleted the fix-24039 branch September 26, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@bracevac bracevac bracevac approved these changes

@Linyxus Linyxus Linyxus approved these changes

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Spurious level errors for Contains

AltStyle によって変換されたページ (->オリジナル) /