diff options
author | Martin Odersky <odersky@gmail.com> | 2008-08-05 16:48:11 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-08-05 16:48:11 +0000 |
commit | e2be618472daa31f442b61a11a4bd3fe434cddce (patch) | |
tree | 1c607318344a9e2f4ce6548a93af3293a6562081 /test/files | |
parent | e50c7947b58e4937e1d5bd8a346be3c44592962c (diff) | |
download | scala-e2be618472daa31f442b61a11a4bd3fe434cddce.tar.gz scala-e2be618472daa31f442b61a11a4bd3fe434cddce.tar.bz2 scala-e2be618472daa31f442b61a11a4bd3fe434cddce.zip |
fixed #1163.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t1163.check | 7 | ||||
-rw-r--r-- | test/files/neg/t1163.scala | 2 | ||||
-rw-r--r-- | test/files/pos/bug1087.scala | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/test/files/neg/t1163.check b/test/files/neg/t1163.check new file mode 100644 index 0000000000..c96ec732a5 --- /dev/null +++ b/test/files/neg/t1163.check @@ -0,0 +1,7 @@ +t1163.scala:2: error: error overriding method foo in trait Sub of type => Sub; + method foo in trait Super of type => Super has incompatible type => Super; + (Note that method foo in trait Sub of type => Sub is abstract, + and is therefore overridden by concrete method foo in trait Super of type => Super) +trait Sub extends Super { override def foo: Sub } + ^ +one error found diff --git a/test/files/neg/t1163.scala b/test/files/neg/t1163.scala new file mode 100644 index 0000000000..caf5747f9e --- /dev/null +++ b/test/files/neg/t1163.scala @@ -0,0 +1,2 @@ +trait Super { def foo: Super = new Super {} } +trait Sub extends Super { override def foo: Sub } diff --git a/test/files/pos/bug1087.scala b/test/files/pos/bug1087.scala deleted file mode 100644 index 19d62116c6..0000000000 --- a/test/files/pos/bug1087.scala +++ /dev/null @@ -1,2 +0,0 @@ -case class Foo -case class Prd (pred : Char => Boolean) extends Foo |