diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index db6550feef5b2..2df3ac42c778e 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -4681,6 +4681,8 @@ bool ValueDecl::isMoreVisibleThan(ValueDecl *other) const { if (scope.isPublic()) return !otherScope.isPublic(); + else if (scope.isPackage()) + return !otherScope.isPublicOrPackage(); else if (scope.isInternal()) return !otherScope.isPublic() && !otherScope.isInternal(); else