summaryrefslogtreecommitdiff
path: root/test/files/neg/typeerror.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-06-19 13:52:31 +0000
committerMartin Odersky <odersky@gmail.com>2007-06-19 13:52:31 +0000
commit7b6fe636f87ec3e5643adb6d6fc36a800b8e2022 (patch)
tree32746f3bdaa00d0261f2fb67350b19dc6bf0e5e8 /test/files/neg/typeerror.scala
parent1edd1f1db181088b1cbbe7358190993b4ef82161 (diff)
downloadscala-7b6fe636f87ec3e5643adb6d6fc36a800b8e2022.tar.gz
scala-7b6fe636f87ec3e5643adb6d6fc36a800b8e2022.tar.bz2
scala-7b6fe636f87ec3e5643adb6d6fc36a800b8e2022.zip
changed test files: bug1001 compiles now.
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)
+}