@@ -4207,7 +4207,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
42074207
42084208 // Finally, check parameterized protocol requirements.
42094209 if (!layout.getParameterizedProtocols().empty()) {
4210- SmallVector<std::pair<AssociatedTypeDecl * , Type>, 4> fromReqs;
4210+ SmallVector<std::pair<Identifier , Type>, 4> fromReqs;
42114211
42124212 if (type1->isExistentialType()) {
42134213 auto fromLayout = type1->getExistentialLayout();
@@ -4218,8 +4218,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
42184218
42194219 for (unsigned i : indices(argTypes)) {
42204220 auto argType = argTypes[i];
4221- auto *assocType = assocTypes[i]->getAssociatedTypeAnchor();
4222- fromReqs.push_back(std::make_pair(assocType, argType));
4221+ fromReqs.push_back(std::make_pair(assocTypes[i]->getName(), argType));
42234222 }
42244223 }
42254224 }
@@ -4234,10 +4233,9 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
42344233
42354234 for (unsigned i : indices(argTypes)) {
42364235 auto argType = argTypes[i];
4237- auto *assocType = assocTypes[i]->getAssociatedTypeAnchor();
42384236 bool found = false;
42394237 for (auto fromReq : fromReqs) {
4240- if (fromReq.first == assocType ) {
4238+ if (fromReq.first == assocTypes[i]->getName() ) {
42414239 // FIXME: Extend the locator path to point to the argument
42424240 // inducing the requirement.
42434241 auto result = matchTypes(fromReq.second, argType,
0 commit comments