@@ -6024,7 +6024,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
60246024 MultiConformanceChecker groupChecker (Context);
60256025
60266026 ProtocolConformance *SendableConformance = nullptr ;
6027- bool sendableConformanceIsUnchecked = false ;
6027+ bool hasDeprecatedUnsafeSendable = false ;
60286028 bool sendableConformancePreconcurrency = false ;
60296029 bool anyInvalid = false ;
60306030 for (auto conformance : conformances) {
@@ -6056,12 +6056,8 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
60566056 SendableConformance = conformance;
60576057
60586058 if (auto normal = conformance->getRootNormalConformance ()) {
6059- if (normal->isUnchecked ())
6060- sendableConformanceIsUnchecked = true ;
6061- else if (isImpliedByConformancePredatingConcurrency (normal))
6059+ if (isImpliedByConformancePredatingConcurrency (normal))
60626060 sendableConformancePreconcurrency = true ;
6063- else if (isa<InheritedProtocolConformance>(conformance))
6064- sendableConformanceIsUnchecked = true ;
60656061 }
60666062 } else if (proto->isSpecificProtocol (KnownProtocolKind::DistributedActor)) {
60676063 if (auto classDecl = dyn_cast<ClassDecl>(nominal)) {
@@ -6105,7 +6101,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
61056101 }
61066102 } else if (proto->isSpecificProtocol (
61076103 KnownProtocolKind::UnsafeSendable)) {
6108- sendableConformanceIsUnchecked = true ;
6104+ hasDeprecatedUnsafeSendable = true ;
61096105 } else if (proto->isSpecificProtocol (KnownProtocolKind::Executor)) {
61106106 tryDiagnoseExecutorConformance (Context, nominal, proto);
61116107 } else if (NoncopyableGenerics
@@ -6123,7 +6119,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
61236119 }
61246120
61256121 // Check constraints of Sendable.
6126- if (SendableConformance && !sendableConformanceIsUnchecked ) {
6122+ if (!hasDeprecatedUnsafeSendable && SendableConformance ) {
61276123 SendableCheck check = SendableCheck::Explicit;
61286124 if (sendableConformancePreconcurrency)
61296125 check = SendableCheck::ImpliedByStandardProtocol;
0 commit comments