summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-11-04 15:37:03 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-11-04 15:37:03 +0000
commit4f84b00b86e16644deb615bec026e09d78271c0b (patch)
treee5c0dcbd4e155dea875fd3c8f72e917e61e1bcc0 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parente6f0eb6e1ba6c5db5555b0b5aad6cecdf936a2d5 (diff)
downloadscala-4f84b00b86e16644deb615bec026e09d78271c0b.tar.gz
scala-4f84b00b86e16644deb615bec026e09d78271c0b.tar.bz2
scala-4f84b00b86e16644deb615bec026e09d78271c0b.zip
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).
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala4
1 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 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")