Skip to content
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

Normalize types before collecting parts determining implicit scope #20077

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

EugeneFlesselle
Copy link
Contributor

@EugeneFlesselle EugeneFlesselle commented Apr 3, 2024

This is necessary to ensure the implicit scope is consistent when involving match types, since they may or may not have been reduced before implicit search.

We can for example get different results when loading from tasty than when in the same run.

Fixes #20071

@EugeneFlesselle EugeneFlesselle force-pushed the issues/i20071 branch 2 times, most recently from b28dfa2 to 1a8e9b0 Compare April 3, 2024 11:55
This is necessary to ensure the implicit scope is consistent when involving match types, since they may or may not have been reduced before implicit search.
We can for example get different results when loading from tasty than when in the same run.

Fixes scala#20071
@EugeneFlesselle EugeneFlesselle changed the title [WIP] Normalize type before collecting parts determining implicit scope Normalize types before collecting parts determining implicit scope Apr 4, 2024
@EugeneFlesselle EugeneFlesselle marked this pull request as ready for review April 4, 2024 10:03
@EugeneFlesselle EugeneFlesselle requested a review from odersky April 4, 2024 10:04
@odersky odersky merged commit 90c3fbd into scala:main Apr 8, 2024
19 checks passed
@odersky odersky deleted the issues/i20071 branch April 8, 2024 20:52
odersky added a commit that referenced this pull request Apr 10, 2024
Match types are already not flagged as `Deferred` when unpickled.
This caused varying results for `ImplicitRunInfo#isAnchor`, by not
reaching the `isMatchAlias` condition when created from the Namer.

Ensures both #20071 and #20136 each have the same result, when compiled
with a classpath dependency as when merged into a single file.

Fixes #20136
@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
Development

Successfully merging this pull request may close these issues.

Given leaked in outer scope
3 participants