We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c914f5 commit 56114eeCopy full SHA for 56114ee
include/swift/AST/AccessScope.h
@@ -68,8 +68,11 @@ class AccessScope {
68
/// Returns the narrowest access scope if this and the specified access scope
69
/// have common intersection, or None if scopes don't intersect.
70
const Optional<AccessScope> intersectWith(AccessScope accessScope) const {
71
- if (hasEqualDeclContextWith(accessScope))
72
- return *this;
+ if (hasEqualDeclContextWith(accessScope)) {
+ if (isPrivate())
73
+ return *this;
74
+ return accessScope;
75
+ }
76
if (isChildOf(accessScope))
77
return *this;
78
if (accessScope.isChildOf(*this))
0 commit comments