summaryrefslogtreecommitdiff
path: root/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
blob: f719972a17fe95e77a6000a70591e130120af5ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import scala.collection.generic.GenericTraversableTemplate
import scala.collection.Iterable

class IterableOps[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2])) {
  def unzip: (CC[A1], CC[A2]) = sys.error("foo")
}

object Test {

  implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2]))
      = new IterableOps[CC, A1, A2](tuple)

  val t = (List(1, 2, 3), List(6, 5, 4))

  tupleOfIterableWrapper(t) unzip
}