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

Refine condition when to report errors in an inserted apply #15016

Merged
merged 1 commit into from
May 9, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 23, 2022

Fixes #15000

|
| longer explanation available when compiling with `-explain`
-- [E008] Not Found Error: tests/neg/i15000.scala:20:4 -----------------------------------------------------------------
20 | c(x, barY) // error // error
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we get the ambiguity error also for str(x, barY)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's more subtle. In the stringExtensions case, we try the implicit conversion any2stringadd first, and that causes the "not found" error.

@prolativ prolativ assigned odersky and unassigned prolativ May 4, 2022
@odersky odersky assigned prolativ and unassigned odersky May 4, 2022
@odersky odersky merged commit 7ff0f34 into scala:main May 9, 2022
@odersky odersky deleted the fix-15000 branch May 9, 2022 12:01
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 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.

Regression in compilation errors when referenced variable doesn't exist
3 participants