diff options
author | Antoine Gourlay <antoine@gourlay.fr> | 2014-08-28 10:40:05 +0200 |
---|---|---|
committer | Antoine Gourlay <antoine@gourlay.fr> | 2014-08-28 10:59:53 +0200 |
commit | 997ef56058d8c44d2b9c5f561edf2aa65221c150 (patch) | |
tree | 9d11fc54c0b13a9e58978c8baad0557421bb8175 /src | |
parent | 7693cecc8b3cf56984a041bb2d7979e2a040314a (diff) | |
download | scala-997ef56058d8c44d2b9c5f561edf2aa65221c150.tar.gz scala-997ef56058d8c44d2b9c5f561edf2aa65221c150.tar.bz2 scala-997ef56058d8c44d2b9c5f561edf2aa65221c150.zip |
SI-8828 fix regression in Xlint visibility warning for sealed classes
5dfcf5e reverted a change to `Symbol#isEffectivelyFinal` (made in
adeffda) that broke overriding checks, and moved the new enhanced
version to a new method.
However, the test for inaccessible type access still uses the old one,
so it lost the ability to see that the owner of some method is either
final or sealed and not overridden.
This just makes it use the new `isEffectivelyFinalOrNotOverriden`.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 |
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 47465875e9..1cb775959d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1633,7 +1633,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans if (settings.warnNullaryUnit) checkNullaryMethodReturnType(sym) if (settings.warnInaccessible) { - if (!sym.isConstructor && !sym.isEffectivelyFinal && !sym.isSynthetic) + if (!sym.isConstructor && !sym.isEffectivelyFinalOrNotOverridden && !sym.isSynthetic) checkAccessibilityOfReferencedTypes(tree) } tree match { |