File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -525,7 +525,6 @@ object RefChecks {
525525
526526 // todo: align accessibility implication checking with isAccessible in Contexts
527527 def isOverrideAccessOK =
528- val memberIsPublic = (member.flags & AccessFlags ).isEmpty && ! member.privateWithin.exists
529528 def protectedOK = ! other.is(Protected ) || member.is(Protected ) // if o is protected, so is m
530529 def accessBoundaryOK =
531530 val ob = other.accessBoundary(member.owner)
@@ -534,7 +533,7 @@ object RefChecks {
534533 def companionBoundaryOK = ob.isClass && ! ob.isLocalToBlock && mb.is(Module ) && (ob.companionModule eq mb.companionModule)
535534 ob.isContainedIn(mb) || companionBoundaryOK // m relaxes o's access boundary,
536535 def otherIsJavaProtected = other.isAllOf(JavaProtected ) // or o is Java defined and protected (see #3946)
537- memberIsPublic || protectedOK && (accessBoundaryOK || otherIsJavaProtected)
536+ member.isPublic || protectedOK && (accessBoundaryOK || otherIsJavaProtected)
538537 end isOverrideAccessOK
539538
540539 if ! member.hasTargetName(other.targetName) then
@@ -1169,8 +1168,7 @@ object RefChecks {
11691168 target.nonPrivateMember(sym.name)
11701169 .filterWithPredicate:
11711170 member =>
1172- val memberIsPublic = (member.symbol.flags & AccessFlags ).isEmpty && ! member.symbol.privateWithin.exists
1173- memberIsPublic && {
1171+ member.symbol.isPublic && {
11741172 val memberIsImplicit = member.info.hasImplicitParams
11751173 val paramTps =
11761174 if memberIsImplicit then methTp.stripPoly.firstParamTypes
You can’t perform that action at this time.
0 commit comments