Change in behavior in 2.13 for implicit overloads #11662
Open
Description
This code compiles on Scala 2.10, 2.11, and 2.12:
class Foo(xs: List[_])
object Foo {
def make(xs: List[_]): Foo = new Foo(xs)
implicit def make[A](xs: List[A])(implicit X: DummyImplicit): Foo = new Foo(xs)
}
List(""): Foo
…but the last line fails to compile on 2.13.0:
scala> List(""): Foo
^
error: ambiguous reference to overloaded definition,
both method make in object Foo of type [A](xs: List[A])(implicit X: DummyImplicit)Foo
and method make in object Foo of type (xs: List[_])Foo
match argument types (List[String]) and expected result type Foo
I'm about 80% convinced the bug is on the 2.10, 2.11, 2.12 side of things, and that the 2.13.0 behavior is correct, but I'm opening this issue for the 20% where I'm wrong about that.
For what it's worth I ran into this issue in real code in the Sangria tests.