Closed
Description
Dotty seems to have inherited this issue from Scala: scala/bug#9523
object works {
class A {
def foo(): String = ???
}
implicit class PimpedA(a: A) {
def foo(i: String): String = ???
}
val a = new A()
a.foo("test") //compiles
}
object fails { //same as `works`, but adds type parameter
class A {
def foo[T](): String = ???
}
implicit class PimpedA(a: A) {
def foo[T](i: String): String = ???
}
val a = new A()
PimpedA(a).foo("test") // compiles
a.foo("test") // error: too many arguments for method foo: (): String
}