Closed
Description
For some reason the implicit asPair: A => (A1, A2)
parameter of the unzip is not found or not inserted. As a consequence unzip
is treated as a partially applied function. Note that also happens for ArrayBuffer
but not for List
and Array
.
import scala.collection.mutable.ListBuffer
class Foo {
val zipped: ListBuffer[(String, Int)] = null
val unzipped: (ListBuffer[String], ListBuffer[Int]) = zipped.unzip
}
5 | val unzipped: (ListBuffer[String], ListBuffer[Int]) = zipped.unzip
| ^
|found: ((String, Int)) => (Any, Any) => (scala.collection.Traversable[Any],
| scala.collection.Traversable[Any]
|)
|required: (collection.mutable.ListBuffer[String], collection.mutable.ListBuffer[Int])
|