File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ object CheckUnused:
581
581
end checkExplicit
582
582
// begin
583
583
if ! infos.skip(m)
584
- && ! m.nextOverriddenSymbol.exists
584
+ && ! m.isEffectivelyOverride
585
585
&& ! allowed
586
586
then
587
587
checkExplicit()
@@ -923,7 +923,9 @@ object CheckUnused:
923
923
}
924
924
def isEffectivelyPrivate : Boolean =
925
925
sym.is(Private , butNot = ParamAccessor )
926
- || sym.owner.isAnonymousClass && ! sym.is(Override ) && ! sym.nextOverriddenSymbol.exists
926
+ || sym.owner.isAnonymousClass && ! sym.isEffectivelyOverride
927
+ def isEffectivelyOverride (using Context ): Boolean =
928
+ sym.is(Override ) || sym.nextOverriddenSymbol.exists
927
929
// pick the symbol the user wrote for purposes of tracking
928
930
inline def userSymbol : Symbol =
929
931
if sym.denot.is(ModuleClass ) then sym.denot.companionModule else sym
You can’t perform that action at this time.
0 commit comments