From 4f84b00b86e16644deb615bec026e09d78271c0b Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn Date: Tue, 4 Nov 2008 15:37:03 +0000 Subject: Clarify that the condition/problem is really ab... Clarify that the condition/problem is really about stability, not immutability (given that stability implies immutability, but not vice versa). --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 7172a0a2d0..789bc71d45 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -72,7 +72,7 @@ abstract class RefChecks extends InfoTransform { * 1.1. M must have the same or stronger access privileges as O. * 1.2. O must not be final. * 1.3. O is deferred, or M has `override' modifier. - * 1.4. If O is an immutable value, then so is M. + * 1.4. If O is stable, then so is M. * // @M: LIFTED 1.5. Neither M nor O are a parameterized type alias * 1.6. If O is a type alias, then M is an alias of O. * 1.7. If O is an abstract type then @@ -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 an immutable value") + overrideError("needs to be 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") -- cgit v1.2.3