@@ -271,14 +271,16 @@ Optional<Type> ConcreteContraction::substTypeParameterRec(
271
271
auto *proto = assocType->getProtocol ();
272
272
auto *module = proto->getParentModule ();
273
273
274
+ bool allowUnavailable =
275
+ !proto->isSpecificProtocol (KnownProtocolKind::Sendable);
274
276
// The 'Sendable' protocol does not declare any associated types, so the
275
277
// 'allowMissing' value here is actually irrelevant.
276
278
auto conformance = ((*substBaseType)->isTypeParameter ()
277
279
? ProtocolConformanceRef (proto)
278
280
: module ->lookupConformance (
279
281
*substBaseType, proto,
280
282
/* allowMissing=*/ false ,
281
- /* allowUnavailable= */ false ));
283
+ allowUnavailable));
282
284
283
285
// The base type doesn't conform, in which case the requirement remains
284
286
// unsubstituted.
@@ -391,9 +393,11 @@ ConcreteContraction::substRequirement(const Requirement &req) const {
391
393
if (ConcreteTypes.count (stripBoundDependentMemberTypes (firstType)) > 0 )
392
394
allowMissing = true ;
393
395
396
+ bool allowUnavailable =
397
+ !proto->isSpecificProtocol (KnownProtocolKind::Sendable);
394
398
if (!substFirstType->isTypeParameter () &&
395
399
!module ->lookupConformance (substFirstType, proto,
396
- allowMissing, /* allowUnavailable= */ false )) {
400
+ allowMissing, allowUnavailable)) {
397
401
// Handle the case of <T where T : P, T : C> where C is a class and
398
402
// C does not conform to P by leaving the conformance requirement
399
403
// unsubstituted.
0 commit comments