summaryrefslogblamecommitdiff
path: root/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
blob: 97594d506d3ab812aeff296cc24331ca69835f62 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                                                        
                                                                                                                                           
                                          
    



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