Skip to content

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

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

Closed
wants to merge 2 commits into from

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 26, 2025

Backports scala#23532 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

odersky added 2 commits July 26, 2025 17:58
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 tgodzik closed this Jul 28, 2025
@tgodzik tgodzik deleted the backport-lts-3.3-23532 branch July 28, 2025 14:38
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