Open
Description
Compiler version
3.5.2
Minimized code
class C
object Implicits {
implicit class RichC1(c: C) {
// Please notice the protected:
protected def m(): Unit = println("foo")
}
implicit class RichC2(c: C) {
def m(): Unit = println("bar")
}
}
object Sample {
import Implicits._
val c = new C
c.m()
}
Output
Found: (Playground.Sample.c : Playground.C)
Required: ?{ m: ? }
Note that implicit extension methods cannot be applied because they are ambiguous;
both method RichC1 in object Implicits and method RichC2 in object Implicits provide an extension method `m` on (Playground.Sample.c : Playground.C)
Expectation
should compile