[Sema] Treat open as we do public for testable and private imports

This should be NFC but will help streamline implementation of
access-level on imports enforcement.
This commit is contained in:
Alexis Laferrière
2023-09-05 12:45:36 -07:00
parent 242d01c393
commit 41e371b175

View File

@@ -3155,6 +3155,7 @@ bool SourceFile::hasTestableOrPrivateImport(
case AccessLevel::Internal:
case AccessLevel::Package:
case AccessLevel::Public:
case AccessLevel::Open:
// internal/public access only needs an import marked as @_private. The
// filename does not need to match (and we don't serialize it for such
// decls).
@@ -3173,8 +3174,6 @@ bool SourceFile::hasTestableOrPrivateImport(
desc.options.contains(ImportFlags::PrivateImport);
}
});
case AccessLevel::Open:
return true;
case AccessLevel::FilePrivate:
case AccessLevel::Private:
// Fallthrough.