summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-07-02 13:39:23 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-07-02 13:39:23 +0000
commit510f9833512173798008198c86d86d1f10a24e15 (patch)
treedf4069a1bf55ee48b0eccb1e584330e91edcd8c5 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parentb0cee5943fd5d3ca077e000eafee4bde476c33d8 (diff)
downloadscala-510f9833512173798008198c86d86d1f10a24e15.tar.gz
scala-510f9833512173798008198c86d86d1f10a24e15.tar.bz2
scala-510f9833512173798008198c86d86d1f10a24e15.zip
Fixed bug 1194, overriding lazy values.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 48ffb1a186..9880f88ff3 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -179,7 +179,7 @@ abstract class RefChecks extends InfoTransform {
} else if ((other hasFlag ABSOVERRIDE) && other.isIncompleteIn(clazz) && !(member hasFlag ABSOVERRIDE)) {
overrideError("needs `abstract override' modifiers")
} else if ((member hasFlag (OVERRIDE | ABSOVERRIDE)) &&
- (other hasFlag ACCESSOR) && other.accessed.isVariable) {
+ (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")