Skip to content

Commit 1f23f7a

Browse files
committed
Sema: Don't emit bogus warnings about Sendable tuple conformance
1 parent c3fb137 commit 1f23f7a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/Sema/ResilienceDiagnostics.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ TypeChecker::diagnoseConformanceExportability(SourceLoc loc,
280280
if (!where.mustOnlyReferenceExportedDecls())
281281
return false;
282282

283+
// Skip the special Sendable and Copyable conformances we synthesized in
284+
// ASTContext::getBuiltinTupleDecl().
285+
if (ext->getParentModule()->isBuiltinModule())
286+
return false;
287+
283288
auto originKind = getDisallowedOriginKind(ext, where);
284289
if (originKind == DisallowedOriginKind::None)
285290
return false;
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
public struct G<T: Sendable> {}
4+
5+
public func makeG() -> G<Void> {}
6+
7+
// No spurious warning about use of conformance from Builtin module

0 commit comments

Comments
 (0)