Inaccessible method can cause implicit conversion search to fail #11787
Labels
fixed in Scala 3
This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
has PR
implicit
Milestone
This code doesn't compile:
The error message says there's an ambiguity:
The following also fails (as expected):
Because:
So a method that isn't actually a candidate for the implicit conversion can still cause the search to fail because of ambiguity.
I've confirmed that the code above doesn't compile on 2.11.12, 2.12.10, and 2.13.1. The problem looks vaguely familiar to me but I couldn't find a previous report.
The text was updated successfully, but these errors were encountered: