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 859dabd commit 23d9defCopy full SHA for 23d9def
lib/AST/Decl.cpp
@@ -1481,7 +1481,11 @@ ArrayRef<ValueDecl *> ImportDecl::getDecls() const {
1481
1482
AccessLevel ImportDecl::getAccessLevel() const {
1483
if (auto attr = getAttrs().getAttribute<AccessControlAttr>()) {
1484
- return attr->getAccess();
+ if (attr->getAccess() == AccessLevel::Open) {
1485
+ // Use a conservative import if the level given is invalid.
1486
+ return AccessLevel::Internal;
1487
+ } else
1488
+ return attr->getAccess();
1489
}
1490
1491
auto &LangOpts = getASTContext().LangOpts;
0 commit comments