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

Suggest imports for the expected type of the underlying implicit not found error #17976

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

julienrf
Copy link
Contributor

@julienrf julienrf commented Jun 14, 2023

We used to suggest imports for the outermost type of a chain of implicits.
Now, we suggest imports for the expectedType of the underlying NoMatchingImplicits.

Fixes #8827

@julienrf julienrf force-pushed the conditional-implicits-suggestions branch from 93510a9 to 19b7b29 Compare June 16, 2023 13:33
@julienrf julienrf changed the title Investigate #8827 Suggest imports for the expected type of the underlying implicit not found error Jun 16, 2023
@julienrf julienrf changed the title Suggest imports for the expected type of the underlying implicit not found error Suggest imports for the expected type of the underlying implicit not found error Jun 16, 2023
@julienrf julienrf marked this pull request as ready for review June 16, 2023 13:36
Copy link
Contributor Author

@julienrf julienrf left a comment

Choose a reason for hiding this comment

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

I have a couple of questions about my changes, what do you think about them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as i8827a but with Scala 3 contextual abstractions.

@julienrf julienrf force-pushed the conditional-implicits-suggestions branch 2 times, most recently from d32415a to 0419671 Compare June 19, 2023 11:24
…found error

We used to suggest imports for the outermost type of a chain of implicits.
Now, we suggest imports for the `expectedType` of the underlying `NoMatchingImplicits`.

Fixes scala#8827
@julienrf julienrf force-pushed the conditional-implicits-suggestions branch from 0419671 to a0dd67d Compare June 19, 2023 13:12
@julienrf julienrf requested a review from odersky June 19, 2023 13:17
@julienrf
Copy link
Contributor Author

CI is green and PR ready for review.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM!

@julienrf julienrf merged commit b614d84 into scala:main Jun 20, 2023
@julienrf julienrf deleted the conditional-implicits-suggestions branch June 20, 2023 11:35
@julienrf
Copy link
Contributor Author

Thank you for the quick review.

@julienrf julienrf added this to the 3.3.2 milestone Jun 22, 2023
@Kordyjan Kordyjan modified the milestones: 3.3.2, 3.4.0 Aug 1, 2023
Kordyjan added a commit that referenced this pull request Dec 8, 2023
…licit not found error" to LTS (#19028)

Backports #17976 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
@Kordyjan Kordyjan modified the milestones: 3.4.0, 3.3.2 Dec 14, 2023
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.

No import suggestions for conditional implicit definitions
3 participants