From 4fff3aad3d1b567179cf14eb0f1adbdb181acf1f Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn Date: Tue, 4 Nov 2008 16:04:30 +0000 Subject: Fixed the test that broke because of the change in the error message. Adjusted the error message slightly because saying that a "def needs to be stable" does not make much sense because you can't make defs stable. --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- test/files/neg/bug521.check | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 789bc71d45..e18b3f6130 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -198,7 +198,7 @@ abstract class RefChecks extends InfoTransform { (other hasFlag ACCESSOR) && other.accessed.isVariable && !other.accessed.hasFlag(LAZY)) { overrideError("cannot override a mutable variable") } else if (other.isStable && !member.isStable) { // (1.4) - overrideError("needs to be stable") + overrideError("is not stable") } else if (member.isValue && (member hasFlag LAZY) && other.isValue && !other.isSourceMethod && !other.isDeferred && !(other hasFlag LAZY)) { overrideError("cannot override a concrete non-lazy value") diff --git a/test/files/neg/bug521.check b/test/files/neg/bug521.check index 1b05acae18..b85e26677b 100644 --- a/test/files/neg/bug521.check +++ b/test/files/neg/bug521.check @@ -9,7 +9,7 @@ bug521.scala:13: error: class ZipArchive needs to be abstract, since method path 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; - method path needs to be an immutable value + method path is not stable override def path = ""; ^ four errors found -- cgit v1.2.3