Skip to content

Commit 2ec8efe

Browse files
committed
Sema: Allow some @_implementationOnly imports in stdlib modules.
The `_Concurrency` module imports a C module that is not available in the toolchain or SDK, which means that `@_implementationOnly` must be used to hide the dependency on this module from clients.
1 parent 99fd29c commit 2ec8efe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/ImportResolution.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,9 @@ void UnboundImport::validateInterfaceWithPackageName(ModuleDecl *topLevelModule,
797797
/// be hidden from clients.
798798
static bool shouldSuppressNonResilientImplementationOnlyImportDiagnostic(
799799
StringRef targetName, StringRef importerName) {
800+
if (targetName == "SwiftConcurrencyInternalShims")
801+
return importerName == "_Concurrency";
802+
800803
if (targetName == "CCryptoBoringSSL" || targetName == "CCryptoBoringSSLShims")
801804
return importerName == "Crypto" || importerName == "_CryptoExtras" ||
802805
importerName == "CryptoBoringWrapper";

0 commit comments

Comments
 (0)