Closed
Description
class Foo
object Test {
implicit class One(x: Foo) {
def meth: Unit = {}
}
implicit class Two(x: Foo) {
private def meth: Unit = {}
}
def test(foo: Foo): Unit = {
foo.meth
}
}
-- [E007] Type Mismatch Error: try/privimpl.scala ------------------------------
13 | foo.meth
| ^^^
|found: Foo(foo)
|required: ?{ meth: ? }
|
|
|Note that implicit conversions cannot be applied because they are ambiguous;
| both method Two in object Test and method One in object Test convert from Foo(foo) to ?{ meth: Unit }