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

Improvements for implicit searches with top-level type variables #16001

Merged
merged 5 commits into from Sep 9, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 8, 2022

Two improvements for implicit searches involving type variables.

  1. We now always add a comment when an implicit search is rejected due to the "too unspecific" criterion of Impose implicit search limit #13886, commit
    Refine checking for underspecified implicit queries.

There have been quite a few regressions that hit that problem, so it is good to know immediately what
the issue is.

  1. There is now a better wildcard approximation of higher-kinded type applications. This makes several programs (including original Implicit conversion not applied for the arguments of extension method #15998) compile, which were classified as not specific enough before.

Fixes #15998
Fixes #15820
Fixes #15670
Fixes #15160
Fixes #13986

@odersky odersky marked this pull request as ready for review September 8, 2022 16:09
@odersky odersky changed the title Better diagnostics for too unspecific implicit searches Improvements for specific searches with top-level type variables Sep 9, 2022
@odersky odersky changed the title Improvements for specific searches with top-level type variables Improvements for implicit searches with top-level type variables Sep 9, 2022
Co-authored-by: Guillaume Martres <smarter@ubuntu.com>
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice improvement!

@smarter smarter merged commit be375ec into scala:main Sep 9, 2022
@smarter smarter deleted the fix-15998 branch September 9, 2022 13:44
@Kordyjan Kordyjan added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Sep 12, 2022
@Kordyjan Kordyjan added this to the 3.2.1 backports milestone Sep 15, 2022
@Kordyjan Kordyjan added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Sep 15, 2022
Kordyjan added a commit that referenced this pull request Sep 15, 2022
@Kordyjan Kordyjan added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Sep 15, 2022
@Kordyjan Kordyjan modified the milestones: 3.2.1 backports, 3.2.2 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment