The following code causes the Scala compiler to not output the type _placeholder
Map(1 -> 2).toSet.map(_._2)
<console>:11: error: missing parameter type for expanded function ((x$1) => x$1._2)
Map(1 -> 2).toSet.map(_._2)
in a similar example with a function filter, Scala type output works well:
Map(1 -> 2).toSet.filter(_._2 > 2)
res6: scala.collection.immutable.Set[(Int, Int)] = Set()
I am using Scala 2.11.7.
source
share