[ConstraintSystem] Strip pack expansions off of pack reference types in

getUnopenedTypeOfReference.
This commit is contained in:
Holly Borla
2022-12-20 21:40:33 -05:00
parent a2346db445
commit 2df72f6bcc
5 changed files with 12 additions and 10 deletions

View File

@@ -8613,8 +8613,6 @@ ConstraintSystem::simplifyPackElementOfConstraint(Type first, Type second,
// This constraint only exists to vend bindings.
auto *packEnv = DC->getGenericEnvironmentOfContext();
if (auto *expansion = packType->getAs<PackExpansionType>())
packType = expansion->getPatternType();
if (packType->isEqual(packEnv->mapElementTypeIntoPackContext
(elementType->mapTypeOutOfContext()))) {
return SolutionKind::Solved;