summaryrefslogblamecommitdiff
path: root/test/files/pos/t0851.scala
blob: fc7109dcd457c3c0cf28897a4c4b83fe9688efac (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                          
package test

object test1 {
  case class Foo[T,T2](f : (T,T2) => String) extends (((T,T2)) => String){
    def apply(t : T) = (s:T2) => f(t,s)
    def apply(p : (T,T2)) = f(p._1,p._2)
  }
  implicit def g[T](f : (T,String) => String) = Foo(f)
  def main(args : Array[String]) : Unit = {
    val f = (x:Int,s:String) => s + x
    println(f(1))
    ()
  }
}