summaryrefslogblamecommitdiff
path: root/test/files/neg/typeerror.scala
blob: 158ad179369acd7133f7ac70c6a5c941d714c3f6 (plain) (tree)
1
2
3
4
5
6
7






                                                           
object Test {
  def add2(x:Long,y:Long): Long = x + y

  def add[Long](x: List[Long], y: List[Long]): List[Long] =
    if (x.isEmpty || y.isEmpty) Nil
    else add2(x.head, y.head) :: add(x.tail, y.tail)
}