diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/abstract-inaccessible.check | 13 | ||||
-rw-r--r-- | test/files/neg/abstract-inaccessible.flags | 1 | ||||
-rw-r--r-- | test/files/neg/abstract-inaccessible.scala | 9 | ||||
-rw-r--r-- | test/files/neg/bug4533.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug4533.scala | 8 | ||||
-rw-r--r-- | test/files/neg/nullary-override.check | 4 | ||||
-rw-r--r-- | test/files/neg/nullary-override.flags | 1 | ||||
-rw-r--r-- | test/files/neg/nullary-override.scala | 3 |
8 files changed, 31 insertions, 12 deletions
diff --git a/test/files/neg/abstract-inaccessible.check b/test/files/neg/abstract-inaccessible.check new file mode 100644 index 0000000000..42b98ac026 --- /dev/null +++ b/test/files/neg/abstract-inaccessible.check @@ -0,0 +1,13 @@ +abstract-inaccessible.scala:5: error: method implementMe in trait YourTrait references private[foo] trait Bippy. +Classes which cannot access Bippy may be unable to provide a concrete implementation of implementMe. + def implementMe(f: Int => (String, Bippy)): Unit + ^ +abstract-inaccessible.scala:6: error: method overrideMe in trait YourTrait references private[foo] trait Bippy. +Classes which cannot access Bippy may be unable to override overrideMe. + def overrideMe[T <: Bippy](x: T): T = x + ^ +abstract-inaccessible.scala:7: error: method overrideMeAlso in trait YourTrait references private[foo] trait Bippy. +Classes which cannot access Bippy may be unable to override overrideMeAlso. + def overrideMeAlso(x: Map[Int, Set[Bippy]]) = 5 + ^ +three errors found diff --git a/test/files/neg/abstract-inaccessible.flags b/test/files/neg/abstract-inaccessible.flags new file mode 100644 index 0000000000..6c1dd108ae --- /dev/null +++ b/test/files/neg/abstract-inaccessible.flags @@ -0,0 +1 @@ +-Xfatal-warnings -Xlint
\ No newline at end of file diff --git a/test/files/neg/abstract-inaccessible.scala b/test/files/neg/abstract-inaccessible.scala new file mode 100644 index 0000000000..3c80f30522 --- /dev/null +++ b/test/files/neg/abstract-inaccessible.scala @@ -0,0 +1,9 @@ +package foo { + private[foo] trait Bippy { } + + trait YourTrait { + def implementMe(f: Int => (String, Bippy)): Unit + def overrideMe[T <: Bippy](x: T): T = x + def overrideMeAlso(x: Map[Int, Set[Bippy]]) = 5 + } +} diff --git a/test/files/neg/bug4533.check b/test/files/neg/bug4533.check deleted file mode 100644 index 0f50b5adb1..0000000000 --- a/test/files/neg/bug4533.check +++ /dev/null @@ -1,4 +0,0 @@ -bug4533.scala:6: error: wrong number of type arguments for scala.collection.GenSetLike, should be 2 - def statusByAlarms(alarms: GenSetLike[FooAlarm]) = println("hello") - ^ -one error found diff --git a/test/files/neg/bug4533.scala b/test/files/neg/bug4533.scala deleted file mode 100644 index 425c958328..0000000000 --- a/test/files/neg/bug4533.scala +++ /dev/null @@ -1,8 +0,0 @@ -package demo - -import scala.collection._ - -class CrashDemo { - def statusByAlarms(alarms: GenSetLike[FooAlarm]) = println("hello") -} -class FooAlarm { } diff --git a/test/files/neg/nullary-override.check b/test/files/neg/nullary-override.check new file mode 100644 index 0000000000..6b2ded2d4a --- /dev/null +++ b/test/files/neg/nullary-override.check @@ -0,0 +1,4 @@ +nullary-override.scala:2: error: non-nullary method overrides nullary method +class B extends A { override def x(): Int = 4 } + ^ +one error found diff --git a/test/files/neg/nullary-override.flags b/test/files/neg/nullary-override.flags new file mode 100644 index 0000000000..6c1dd108ae --- /dev/null +++ b/test/files/neg/nullary-override.flags @@ -0,0 +1 @@ +-Xfatal-warnings -Xlint
\ No newline at end of file diff --git a/test/files/neg/nullary-override.scala b/test/files/neg/nullary-override.scala new file mode 100644 index 0000000000..3eb4784a0c --- /dev/null +++ b/test/files/neg/nullary-override.scala @@ -0,0 +1,3 @@ +class A { def x: Int = 3 } +class B extends A { override def x(): Int = 4 } + |