blob: 6e028d0addc02961df5cdc0d4b38a80655de1818 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 with ScalaObject
required: case1.Bippy with case1.Bippo with ScalaObject
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 : Object with ScalaObject{def g: String}
required: Object with ScalaObject{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 of type object Quux4.this.Bar;
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]] with ScalaObject
required: case2.Bar[Traversable[String]] with ScalaObject
override object A extends Bar[List[String]] // err
^
four errors found
|