AST: Remove bogus PackExpansionType logic in lookupConformance()

This commit is contained in:
Slava Pestov
2023-08-09 17:38:18 -04:00
parent 50afb006ee
commit c26cafc47a
4 changed files with 17 additions and 12 deletions

View File

@@ -1949,18 +1949,6 @@ LookupConformanceInModuleRequest::evaluate(
return getBuiltinBuiltinTypeConformance(type, builtinType, protocol);
}
// Specific handling of Copyable and Sendable for pack expansions.
// FIXME: Remove.
if (auto packExpansion = type->getAs<PackExpansionType>()) {
if (protocol->isSpecificProtocol(KnownProtocolKind::Copyable) ||
protocol->isSpecificProtocol(KnownProtocolKind::Sendable)) {
auto patternType = packExpansion->getPatternType();
return (patternType->isTypeParameter()
? ProtocolConformanceRef(protocol)
: mod->lookupConformance(patternType, protocol));
}
}
auto nominal = type->getAnyNominal();
// If we don't have a nominal type, there are no conformances.