diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug987.check | 29 | ||||
-rw-r--r-- | test/files/pos/looping-jsig.scala | 2 |
2 files changed, 17 insertions, 14 deletions
diff --git a/test/files/neg/bug987.check b/test/files/neg/bug987.check index ec2ca621fd..4cad622ab8 100644 --- a/test/files/neg/bug987.check +++ b/test/files/neg/bug987.check @@ -1,16 +1,19 @@ -bug987.scala:15: error: the type intersection D with ScalaObject is malformed - --- because --- -no common type instance of base types B[C], and B[D] exists. +bug987.scala:15: error: illegal inheritance; + class E inherits different type instances of trait B: +B[D] and B[C] class E extends D - ^ -bug987.scala:20: error: the type intersection D with ScalaObject is malformed - --- because --- -no common type instance of base types B[C], and B[D] exists. + ^ +bug987.scala:20: error: illegal inheritance; + class F inherits different type instances of trait B: +B[D] and B[C] class F extends D - ^ -bug987.scala:25: error: the type intersection C with B[D] with ScalaObject is malformed - --- because --- -no common type instance of base types B[D], and B[C] exists. + ^ +bug987.scala:25: error: illegal inheritance; + class D inherits different type instances of trait B: +B[D] and B[C] abstract class D extends C with B[D] {} - ^ -three errors found + ^ +bug987.scala:25: error: type arguments [D] do not conform to trait B's type parameter bounds [T <: B[T]] +abstract class D extends C with B[D] {} + ^ +four errors found diff --git a/test/files/pos/looping-jsig.scala b/test/files/pos/looping-jsig.scala index 15ccd75cb0..6e3313c463 100644 --- a/test/files/pos/looping-jsig.scala +++ b/test/files/pos/looping-jsig.scala @@ -14,5 +14,5 @@ trait BugTrack { def amethod[T](p: =>A[T]): A[T] = A(in => cache.get(p) match { case Some(res) => res case None => p(in) - }).giveMeSame + }).giveMeSame.asInstanceOf[A[T]] } |