summaryrefslogtreecommitdiff
path: root/test/files/neg/typeerror.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/typeerror.scala')
-rw-r--r--test/files/neg/typeerror.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/typeerror.scala b/test/files/neg/typeerror.scala
new file mode 100644
index 0000000000..158ad17936
--- /dev/null
+++ b/test/files/neg/typeerror.scala
@@ -0,0 +1,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)
+}