aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/override-object-no.check
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/override-object-no.check
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/override-object-no.check')
-rw-r--r--tests/untried/neg/override-object-no.check23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/untried/neg/override-object-no.check b/tests/untried/neg/override-object-no.check
new file mode 100644
index 000000000..9cfda80fc
--- /dev/null
+++ b/tests/untried/neg/override-object-no.check
@@ -0,0 +1,23 @@
+override-object-no.scala:14: error: overriding object Bar in trait Foo with object Bar in trait Foo2:
+an overriding object must conform to the overridden object's class bound;
+ found : case1.Bippy
+ required: case1.Bippy with case1.Bippo
+ override object Bar extends Bippy { // err
+ ^
+override-object-no.scala:21: error: overriding object Bar in trait Quux1 with object Bar in trait Quux2:
+an overriding object must conform to the overridden object's class bound;
+ found : AnyRef{def g: String}
+ required: AnyRef{def g: Int}
+ trait Quux2 extends Quux1 { override object Bar { def g = "abc" } } // err
+ ^
+override-object-no.scala:25: error: overriding object Bar in trait Quux3;
+ object Bar cannot override final member
+ trait Quux4 extends Quux3 { override object Bar } // err
+ ^
+override-object-no.scala:43: error: overriding object A in class Foo with object A in class P2:
+an overriding object must conform to the overridden object's class bound;
+ found : case2.Bar[List[String]]
+ required: case2.Bar[Traversable[String]]
+ override object A extends Bar[List[String]] // err
+ ^
+four errors found