Closed
Description
Compiler version
3.0.0-RC2
Minimized code and output
class B
class A {
def foo(x: B) = ???
def foo(str: String) = ???
}
extension (x: A) def foo(s: Int*) = s.size
val a = new A
println(a.foo(1, 2))
// ^^^^
// Found: (Int, Int)
// Required: Int
Expectation : should work as when there's no overload:
class A {
def foo(x: B) = ???
//def foo(str: String) = ???
}
println(a.foo(1, 2))
// 2
Note that when there's just one parameter it also works
class A {
def foo(x: B) = ???
def foo(str: String) = ???
}
println(a.foo(1))
// 1