diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index c59e8d0008c1a..8c5b0d11b76ac 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -4589,6 +4589,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