File tree 1 file changed +2
-4
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -445,7 +445,6 @@ object RefChecks {
445
445
446
446
// todo: align accessibility implication checking with isAccessible in Contexts
447
447
def isOverrideAccessOK =
448
- val memberIsPublic = (member.flags & AccessFlags ).isEmpty && ! member.privateWithin.exists
449
448
def protectedOK = ! other.is(Protected ) || member.is(Protected ) // if o is protected, so is m
450
449
def accessBoundaryOK =
451
450
val ob = other.accessBoundary(member.owner)
@@ -454,7 +453,7 @@ object RefChecks {
454
453
def companionBoundaryOK = ob.isClass && ! ob.isLocalToBlock && mb.is(Module ) && (ob.companionModule eq mb.companionModule)
455
454
ob.isContainedIn(mb) || companionBoundaryOK // m relaxes o's access boundary,
456
455
def otherIsJavaProtected = other.isAllOf(JavaProtected ) // or o is Java defined and protected (see #3946)
457
- memberIsPublic || protectedOK && (accessBoundaryOK || otherIsJavaProtected)
456
+ member.isPublic || protectedOK && (accessBoundaryOK || otherIsJavaProtected)
458
457
end isOverrideAccessOK
459
458
460
459
if ! member.hasTargetName(other.targetName) then
@@ -1069,8 +1068,7 @@ object RefChecks {
1069
1068
target.nonPrivateMember(sym.name)
1070
1069
.filterWithPredicate:
1071
1070
member =>
1072
- val memberIsPublic = (member.symbol.flags & AccessFlags ).isEmpty && ! member.symbol.privateWithin.exists
1073
- memberIsPublic && {
1071
+ member.symbol.isPublic && {
1074
1072
val memberIsImplicit = member.info.hasImplicitParams
1075
1073
val paramTps =
1076
1074
if memberIsImplicit then methTp.stripPoly.firstParamTypes
You can’t perform that action at this time.
0 commit comments