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 fefbbb6 commit 66a994bCopy full SHA for 66a994b
lib/AST/Module.cpp
@@ -2547,7 +2547,8 @@ RestrictedImportKind SourceFile::getRestrictedImportKind(const ModuleDecl *modul
2547
return RestrictedImportKind::None;
2548
2549
if (importKind == RestrictedImportKind::Implicit &&
2550
- module->getLibraryLevel() == LibraryLevel::API) {
+ (module->getLibraryLevel() == LibraryLevel::API ||
2551
+ getParentModule()->getLibraryLevel() != LibraryLevel::API)) {
2552
// Hack to fix swiftinterfaces in case of missing imports.
2553
// We can get rid of this logic when we don't leak the use of non-locally
2554
// imported things in API.
0 commit comments