From 3527c51675fd580d6d61f3252eb34e6fbba44226 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 30 Aug 2007 13:39:15 +0000 Subject: fixed lift build problem. --- test/files/neg/t0003.check | 6 ++++++ test/files/neg/t0003.scala | 3 +++ test/files/neg/t0015.check | 11 +++++++++++ test/files/neg/t0015.scala | 25 +++++++++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 test/files/neg/t0003.check create mode 100644 test/files/neg/t0003.scala create mode 100644 test/files/neg/t0015.check create mode 100644 test/files/neg/t0015.scala (limited to 'test/files/neg') 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) +} -- cgit v1.2.3