Closed
Description
Minimized code
def foo(a: Int, b: Int) = a + b
Map(1 -> 2).map(foo _) // ok: List(3)
Map(1 -> 2).map(foo) // error
Output
Map(1 -> 2).map(foo)
^^^^^^^^^^^^^^^
None of the overloaded alternatives of method map in trait IterableOps with types
[B](f: ((Int, Int)) => B): scala.collection.immutable.Iterable[B]
[K2, V2](f: ((Int, Int)) => (K2, V2)): Map[K2, V2]
match arguments ((foo : (a: Int, b: Int): Int))
Expectation
Since the compiler can pick the right overload with explicit eta-expansion, I don't see why he can't do that with automatic eta-expansion.