@@ -6017,7 +6017,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
6017
6017
MultiConformanceChecker groupChecker (Context);
6018
6018
6019
6019
ProtocolConformance *SendableConformance = nullptr ;
6020
- bool sendableConformanceIsUnchecked = false ;
6020
+ bool hasDeprecatedUnsafeSendable = false ;
6021
6021
bool sendableConformancePreconcurrency = false ;
6022
6022
bool anyInvalid = false ;
6023
6023
for (auto conformance : conformances) {
@@ -6049,12 +6049,8 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
6049
6049
SendableConformance = conformance;
6050
6050
6051
6051
if (auto normal = conformance->getRootNormalConformance ()) {
6052
- if (normal->isUnchecked ())
6053
- sendableConformanceIsUnchecked = true ;
6054
- else if (isImpliedByConformancePredatingConcurrency (normal))
6052
+ if (isImpliedByConformancePredatingConcurrency (normal))
6055
6053
sendableConformancePreconcurrency = true ;
6056
- else if (isa<InheritedProtocolConformance>(conformance))
6057
- sendableConformanceIsUnchecked = true ;
6058
6054
}
6059
6055
} else if (proto->isSpecificProtocol (KnownProtocolKind::DistributedActor)) {
6060
6056
if (auto classDecl = dyn_cast<ClassDecl>(nominal)) {
@@ -6098,7 +6094,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
6098
6094
}
6099
6095
} else if (proto->isSpecificProtocol (
6100
6096
KnownProtocolKind::UnsafeSendable)) {
6101
- sendableConformanceIsUnchecked = true ;
6097
+ hasDeprecatedUnsafeSendable = true ;
6102
6098
} else if (proto->isSpecificProtocol (KnownProtocolKind::Executor)) {
6103
6099
tryDiagnoseExecutorConformance (Context, nominal, proto);
6104
6100
} else if (NoncopyableGenerics
@@ -6116,7 +6112,7 @@ void TypeChecker::checkConformancesInContext(IterableDeclContext *idc) {
6116
6112
}
6117
6113
6118
6114
// Check constraints of Sendable.
6119
- if (SendableConformance && !sendableConformanceIsUnchecked ) {
6115
+ if (!hasDeprecatedUnsafeSendable && SendableConformance ) {
6120
6116
SendableCheck check = SendableCheck::Explicit;
6121
6117
if (sendableConformancePreconcurrency)
6122
6118
check = SendableCheck::ImpliedByStandardProtocol;
0 commit comments