Closed
Description
The following code snippet fails to compile with Dotty
object Test {
class C {
def foo(x: Int) = 1
def foo(x: Double) = 2
}
implicit class COps(val x: C) {
def foo(x: String) = 3
}
def test: Unit = {
(new C).foo("Hello")
}
}
The compiler is not able to find the method foo
added via implicit conversion. If one of the overloaded version of foo
is commented out, the code snippet compiles