diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t1163.check | 7 | ||||
-rw-r--r-- | test/files/neg/t1163.scala | 2 | ||||
-rw-r--r-- | test/pending/pos/bug1087.scala (renamed from test/files/pos/bug1087.scala) | 0 |
3 files changed, 9 insertions, 0 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/pending/pos/bug1087.scala index 19d62116c6..19d62116c6 100644 --- a/test/files/pos/bug1087.scala +++ b/test/pending/pos/bug1087.scala |