Skip to content

Backport "Refine implicit search fallbacks for better ClassTag handling" to 3.3 LTS #527

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
Jul 29, 2025

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 28, 2025

Backports scala#23532 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

odersky added 2 commits July 28, 2025 16:41
It's not necessary to instantiate all type variables, deeply, since
we are only interested in the outermost shape. Also, that way we do
not instantiate to Nothing, which is something difficult to recover from.

[Cherry-picked e6bf7b8]
We used to look at deep expected type when the result of an implicit was ambiguous.
This could add more constraints which could resolve the ambiguity.

We now do the same also if the search type has uninstantiated type variables. In that
case, consulting more context might further constrain type variables, which might in
turn enlarge the implicit scope so that a solution can be found.

Fixes scala#23526

[Cherry-picked 45f7ef6]
@tgodzik
Copy link
Author

tgodzik commented Jul 29, 2025

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

Reference

@tgodzik tgodzik merged commit 06dc5c3 into lts-3.3 Jul 29, 2025
22 checks passed
@tgodzik tgodzik deleted the backport-lts-3.3-23532 branch July 29, 2025 10:34
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