summaryrefslogtreecommitdiff
path: root/test/files/pos/liftcode_polymorphic.scala
blob: 3d4b159c83c68a9aa4e02a8fbc79bb571fe06f64 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object Append extends Application {

  def append[A](l1: List[A], l2: List[A]):List[A] =
    l1 match {
      case Nil => l2
      case x::xs => x :: append(xs, l2)
    }

  println(scala.reflect.Code.lift(append _).tree)
}