Sema: Don't emit bogus warnings about Sendable tuple conformance

This commit is contained in:
Slava Pestov
2023-08-10 16:01:17 -04:00
parent c3fb1377a0
commit 1f23f7ad67
2 changed files with 12 additions and 0 deletions

View File

@@ -280,6 +280,11 @@ TypeChecker::diagnoseConformanceExportability(SourceLoc loc,
if (!where.mustOnlyReferenceExportedDecls())
return false;
// Skip the special Sendable and Copyable conformances we synthesized in
// ASTContext::getBuiltinTupleDecl().
if (ext->getParentModule()->isBuiltinModule())
return false;
auto originKind = getDisallowedOriginKind(ext, where);
if (originKind == DisallowedOriginKind::None)
return false;

View File

@@ -0,0 +1,7 @@
// RUN: %target-typecheck-verify-swift
public struct G<T: Sendable> {}
public func makeG() -> G<Void> {}
// No spurious warning about use of conformance from Builtin module