mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Don't emit bogus warnings about Sendable tuple conformance
This commit is contained in:
@@ -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;
|
||||
|
||||
7
test/Sema/export_tuple_conformance.swift
Normal file
7
test/Sema/export_tuple_conformance.swift
Normal 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
|
||||
Reference in New Issue
Block a user