Skip to content

Fix the visibility check in markFree #20221

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 2 commits into from
Apr 26, 2024
Merged

Conversation

Linyxus
Copy link
Contributor

@Linyxus Linyxus commented Apr 18, 2024

Fixes #20169. Fixes #20224.

It turns out that the type argument in #20169 is properly boxed. It is just that when doing box adaptation, when charging cap into environments it gets discarded by the visibility check.

Right now, a symbol is considered visible in an environment only when the owner of the environment is contained in the symbol. This is not right: when there is not containment relation between the symbol and the environment owner the symbol is also visible from the environment, which is the case here for cap.

@Linyxus Linyxus requested a review from odersky April 18, 2024 13:04
@Linyxus
Copy link
Contributor Author

Linyxus commented Apr 18, 2024

This fix seems to break the cc stdlib. I'll look into it.

@Linyxus Linyxus assigned odersky and unassigned Linyxus Apr 19, 2024
@odersky odersky merged commit 79500f7 into scala:main Apr 26, 2024
19 checks passed
@odersky odersky deleted the fix-20169 branch April 26, 2024 10:45
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants