diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/accesses.check | 8 | ||||
-rw-r--r-- | test/files/neg/bug521.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug630.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug708.check | 4 | ||||
-rw-r--r-- | test/files/neg/lazy-override.check | 4 | ||||
-rw-r--r-- | test/files/neg/t1163.check | 4 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance.check | 4 | ||||
-rw-r--r-- | test/files/run/t1524.check | 1 | ||||
-rw-r--r-- | test/files/run/t1524.scala | 7 |
9 files changed, 24 insertions, 16 deletions
diff --git a/test/files/neg/accesses.check b/test/files/neg/accesses.check index 627c17dd90..94fcd615bc 100644 --- a/test/files/neg/accesses.check +++ b/test/files/neg/accesses.check @@ -1,16 +1,16 @@ -accesses.scala:23: error: error overriding method f2 in class A of type => Unit; +accesses.scala:23: error: overriding method f2 in class A of type => Unit; method f2 has weaker access privileges; it should not be private private def f2: Unit = () ^ -accesses.scala:24: error: error overriding method f3 in class A of type => Unit; +accesses.scala:24: error: overriding method f3 in class A of type => Unit; method f3 has weaker access privileges; it should be at least protected private[p2] def f3: Unit = () ^ -accesses.scala:25: error: error overriding method f4 in class A of type => Unit; +accesses.scala:25: error: overriding method f4 in class A of type => Unit; method f4 has weaker access privileges; it should be at least private[p1] private[p2] def f4: Unit ^ -accesses.scala:26: error: error overriding method f5 in class A of type => Unit; +accesses.scala:26: error: overriding method f5 in class A of type => Unit; method f5 has weaker access privileges; it should be at least protected[p1] protected[p2] def f5: Unit ^ diff --git a/test/files/neg/bug521.check b/test/files/neg/bug521.check index b85e26677b..eda06ff9f6 100644 --- a/test/files/neg/bug521.check +++ b/test/files/neg/bug521.check @@ -1,14 +1,14 @@ bug521.scala:10: error: class PlainFile needs to be abstract, since method path in class AbstractFile of type => String is not defined class PlainFile(val file : File) extends AbstractFile {} ^ -bug521.scala:13: error: error overriding value file in class PlainFile of type java.io.File; +bug521.scala:13: error: overriding value file in class PlainFile of type java.io.File; value file needs `override' modifier final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) { ^ bug521.scala:13: error: class ZipArchive needs to be abstract, since method path in class AbstractFile of type => String is not defined final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) { ^ -bug521.scala:15: error: error overriding value path in class VirtualFile of type String; +bug521.scala:15: error: overriding value path in class VirtualFile of type String; method path is not stable override def path = ""; ^ diff --git a/test/files/neg/bug630.check b/test/files/neg/bug630.check index 03113be7da..739d214fe5 100644 --- a/test/files/neg/bug630.check +++ b/test/files/neg/bug630.check @@ -1,5 +1,5 @@ -bug630.scala:20: error: error overriding value foo in trait Bar of type Req2; - object foo has incompatible type object Test.foo +bug630.scala:20: error: overriding value foo in trait Bar of type Req2; + object foo has incompatible type object foo extends Req1 ^ one error found diff --git a/test/files/neg/bug708.check b/test/files/neg/bug708.check index 513709f2a0..cfeb01c87f 100644 --- a/test/files/neg/bug708.check +++ b/test/files/neg/bug708.check @@ -1,5 +1,5 @@ -bug708.scala:8: error: error overriding type S in trait X with bounds >: Nothing <: A.this.T; - type S has incompatible type Any +bug708.scala:8: error: overriding type S in trait X with bounds >: Nothing <: A.this.T; + type S has incompatible type override private[A] type S = Any; ^ one error found diff --git a/test/files/neg/lazy-override.check b/test/files/neg/lazy-override.check index d1c9d305f0..793e6b2020 100644 --- a/test/files/neg/lazy-override.check +++ b/test/files/neg/lazy-override.check @@ -1,8 +1,8 @@ -lazy-override.scala:11: error: error overriding value x in class A of type Int; +lazy-override.scala:11: error: overriding value x in class A of type Int; lazy value x cannot override a concrete non-lazy value override lazy val x: Int = { print("/*B.x*/"); 3 } ^ -lazy-override.scala:13: error: error overriding lazy value y in class A of type Int; +lazy-override.scala:13: error: overriding lazy value y in class A of type Int; value y must be declared lazy to override a concrete lazy value override val y: Int = { print("/*B.y*/"); 3 } ^ diff --git a/test/files/neg/t1163.check b/test/files/neg/t1163.check index c96ec732a5..69e6b7ac4a 100644 --- a/test/files/neg/t1163.check +++ b/test/files/neg/t1163.check @@ -1,5 +1,5 @@ -t1163.scala:2: error: error overriding method foo in trait Sub of type => Sub; - method foo in trait Super of type => Super has incompatible type => Super; +t1163.scala:2: error: overriding method foo in trait Sub of type => Sub; + method foo in trait Super of type => Super has incompatible type; (Note that method foo in trait Sub of type => Sub is abstract, and is therefore overridden by concrete method foo in trait Super of type => Super) trait Sub extends Super { override def foo: Sub } diff --git a/test/files/neg/tcpoly_variance.check b/test/files/neg/tcpoly_variance.check index 146240ac9b..2df4b4d429 100644 --- a/test/files/neg/tcpoly_variance.check +++ b/test/files/neg/tcpoly_variance.check @@ -1,5 +1,5 @@ -tcpoly_variance.scala:6: error: error overriding method str in class A of type => m[java.lang.Object]; - method str has incompatible type => m[String] +tcpoly_variance.scala:6: error: overriding method str in class A of type => m[java.lang.Object]; + method str has incompatible type override def str: m[String] = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] ^ one error found diff --git a/test/files/run/t1524.check b/test/files/run/t1524.check new file mode 100644 index 0000000000..e79c5e8f96 --- /dev/null +++ b/test/files/run/t1524.check @@ -0,0 +1 @@ +initial diff --git a/test/files/run/t1524.scala b/test/files/run/t1524.scala new file mode 100644 index 0000000000..4520028dda --- /dev/null +++ b/test/files/run/t1524.scala @@ -0,0 +1,7 @@ +object Test extends Application { + + val buf = new scala.collection.mutable.ArrayBuffer[String] { override val initialSize = 0 } + buf += "initial" + buf += "second" + println(buf.first) +}
\ No newline at end of file |