Permalink
Browse files

imporved comment related to SI-5178

  • Loading branch information...
lrytz committed May 9, 2012
1 parent aa555de commit 5d90d001083d1206e7700a264370055bc41d4672
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -386,8 +386,9 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R
overrideError("cannot be used here - classes can only override abstract types");
} else if (other.isEffectivelyFinal) { // (1.2)
overrideError("cannot override final member");
// synthetic exclusion needed for (at least) default getters.
} else if (!other.isDeferred && !member.isAnyOverride && !member.isSynthetic) {
} else if (!other.isDeferred && !member.isAnyOverride && !member.isSynthetic) { // (*)
// (*) Synthetic exclusion for (at least) default getters, fixes SI-5178. We cannot assign the OVERRIDE flag to
// the default getter: one default getter might sometimes override, sometimes not. Example in comment on ticket.
if (isNeitherInClass && !(other.owner isSubClass member.owner))
emitOverrideError(
clazz + " inherits conflicting members:\n "

0 comments on commit 5d90d00

Please sign in to comment.