summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-08-30 13:39:15 +0000
committerMartin Odersky <odersky@gmail.com>2007-08-30 13:39:15 +0000
commit3527c51675fd580d6d61f3252eb34e6fbba44226 (patch)
tree5629155492df419560d878f99c1bde2db8ef4963 /test
parent658fc638ac76f04092eccbf58850212130771cbf (diff)
downloadscala-3527c51675fd580d6d61f3252eb34e6fbba44226.tar.gz
scala-3527c51675fd580d6d61f3252eb34e6fbba44226.tar.bz2
scala-3527c51675fd580d6d61f3252eb34e6fbba44226.zip
fixed lift build problem.
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t0003.check6
-rw-r--r--test/files/neg/t0003.scala3
-rw-r--r--test/files/neg/t0015.check11
-rw-r--r--test/files/neg/t0015.scala25
4 files changed, 45 insertions, 0 deletions
diff --git a/test/files/neg/t0003.check b/test/files/neg/t0003.check
new file mode 100644
index 0000000000..5e29b189db
--- /dev/null
+++ b/test/files/neg/t0003.check
@@ -0,0 +1,6 @@
+t0003.scala:2: error: type mismatch;
+ found : (A) => (B) => B
+ required: (?) => B
+ def foo[A, B, C](l: List[A], f: A => B=>B, g: B=>B=>C): List[C] = l map (g compose f)
+ ^
+one error found
diff --git a/test/files/neg/t0003.scala b/test/files/neg/t0003.scala
new file mode 100644
index 0000000000..e41cfa9e9e
--- /dev/null
+++ b/test/files/neg/t0003.scala
@@ -0,0 +1,3 @@
+object Test {
+ def foo[A, B, C](l: List[A], f: A => B=>B, g: B=>B=>C): List[C] = l map (g compose f)
+}
diff --git a/test/files/neg/t0015.check b/test/files/neg/t0015.check
new file mode 100644
index 0000000000..2979237c0a
--- /dev/null
+++ b/test/files/neg/t0015.check
@@ -0,0 +1,11 @@
+t0015.scala:5: error: type mismatch;
+ found : () => Nothing
+ required: (Nothing) => ?
+ Nil.map(f _)
+ ^
+t0015.scala:21: error: type mismatch;
+ found : M
+ required: M.this.selfType
+ f[Int](self: selfType)
+ ^
+two errors found
diff --git a/test/files/neg/t0015.scala b/test/files/neg/t0015.scala
new file mode 100644
index 0000000000..35a6cd11fc
--- /dev/null
+++ b/test/files/neg/t0015.scala
@@ -0,0 +1,25 @@
+abstract class Test
+{
+ def f: Nothing
+
+ Nil.map(f _)
+}
+
+abstract class M
+{ self =>
+
+ type T
+ final type selfType = M {type T = self.T}
+ type actualSelfType >: self.type <: selfType
+
+
+ def f[U](x: Any) = {}
+
+ // compiles successfully
+ //f[Int](self: actualSelfType)
+
+ f[Int](self: selfType)
+
+ //def g(x: Any) = {}
+ //g(self: selfType)
+}