Reproduction steps
Scala version: 2.13.18
trait Ops {
implicit class OpsSyntax[P](private val p: P) {
def add[P1](p: P): P = ???
}
}
object Foo extends Ops {
final case class Bar()
object Bar extends Ops {
def x(): Bar = ???
}
}
object TestErrMsg {
def test(c: Foo.Bar) = {
Foo.Bar.x().add(c)
}
}
Problem
The compiler reports the error message: value add is not a member of testbaderrormessage.this.Foo.Bar. If the type parameter P1 is removed from add, a more informative error message is reported, describing which implicit conversions lead to ambiguity.
Reproduction steps
Scala version: 2.13.18
Problem
The compiler reports the error message:
value add is not a member of testbaderrormessage.this.Foo.Bar. If the type parameterP1is removed fromadd, a more informative error message is reported, describing which implicit conversions lead to ambiguity.