aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/selfInheritance.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/selfInheritance.scala')
-rw-r--r--tests/neg/selfInheritance.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/neg/selfInheritance.scala b/tests/neg/selfInheritance.scala
index 993765817..073316de0 100644
--- a/tests/neg/selfInheritance.scala
+++ b/tests/neg/selfInheritance.scala
@@ -11,22 +11,22 @@ class C { self: B =>
}
-class D extends A // error
+class D extends A // error: illegal inheritance: self type D of class D does not conform to self type B of parent class A
-class E extends T // error
+class E extends T // error: illegal inheritance: self type E of class E does not conform to self type B of parent trait T
object Test {
new B() {}
- new A() {} // error
+ new A() {} // error: illegal inheritance: self type A{...} of anonymous class A{...} does not conform to self type B of parent class A
- object O extends A // error
+ object O extends A // error: illegal inheritance: self type Test.O.type of object O$ does not conform to self type B of parent class A
- object M extends C // error
+ object M extends C // error: illegal inheritance: self type Test.M.type of object M$ does not conform to self type B of parent class C
}
-trait X { self: Y => }
+trait X { self: Y => } // error: missing requirement: self type Y & X of trait X does not conform to self type Z of required trait Y
trait Y { self: Z => }
trait Z