@@ -6017,7 +6017,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
60176017 MultiConformanceChecker groupChecker (Context);
60186018
60196019 ProtocolConformance *SendableConformance = nullptr ;
6020- bool sendableConformanceIsUnchecked = false ;
6020+ bool hasDeprecatedUnsafeSendable = false ;
60216021 bool sendableConformancePreconcurrency = false ;
60226022 bool anyInvalid = false ;
60236023 for (auto conformance : conformances) {
@@ -6049,12 +6049,8 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
60496049 SendableConformance = conformance;
60506050
60516051 if (auto normal = conformance->getRootNormalConformance ()) {
6052- if (normal->isUnchecked ())
6053- sendableConformanceIsUnchecked = true ;
6054- else if (isImpliedByConformancePredatingConcurrency (normal))
6052+ if (isImpliedByConformancePredatingConcurrency (normal))
60556053 sendableConformancePreconcurrency = true ;
6056- else if (isa<InheritedProtocolConformance>(conformance))
6057- sendableConformanceIsUnchecked = true ;
60586054 }
60596055 } else if (proto->isSpecificProtocol (KnownProtocolKind::DistributedActor)) {
60606056 if (auto classDecl = dyn_cast<ClassDecl>(nominal)) {
@@ -6098,7 +6094,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
60986094 }
60996095 } else if (proto->isSpecificProtocol (
61006096 KnownProtocolKind::UnsafeSendable)) {
6101- sendableConformanceIsUnchecked = true ;
6097+ hasDeprecatedUnsafeSendable = true ;
61026098 } else if (proto->isSpecificProtocol (KnownProtocolKind::Executor)) {
61036099 tryDiagnoseExecutorConformance (Context, nominal, proto);
61046100 } else if (NoncopyableGenerics
@@ -6116,7 +6112,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
61166112 }
61176113
61186114 // Check constraints of Sendable.
6119- if (SendableConformance && !sendableConformanceIsUnchecked ) {
6115+ if (!hasDeprecatedUnsafeSendable && SendableConformance ) {
61206116 SendableCheck check = SendableCheck::Explicit;
61216117 if (sendableConformancePreconcurrency)
61226118 check = SendableCheck::ImpliedByStandardProtocol;
0 commit comments