Skip to content

Missing implicit argument in ListBuffer.unzip #2948

Closed
@nicolasstucki

Description

@nicolasstucki

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])
  |

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions