@@ -4222,7 +4222,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4222
4222
4223
4223
// Finally, check parameterized protocol requirements.
4224
4224
if (!layout.getParameterizedProtocols().empty()) {
4225
- SmallVector<std::pair<AssociatedTypeDecl * , Type>, 4> fromReqs;
4225
+ SmallVector<std::pair<Identifier , Type>, 4> fromReqs;
4226
4226
4227
4227
if (type1->isExistentialType()) {
4228
4228
auto fromLayout = type1->getExistentialLayout();
@@ -4233,8 +4233,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4233
4233
4234
4234
for (unsigned i : indices(argTypes)) {
4235
4235
auto argType = argTypes[i];
4236
- auto *assocType = assocTypes[i]->getAssociatedTypeAnchor();
4237
- fromReqs.push_back(std::make_pair(assocType, argType));
4236
+ fromReqs.push_back(std::make_pair(assocTypes[i]->getName(), argType));
4238
4237
}
4239
4238
}
4240
4239
}
@@ -4249,10 +4248,9 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4249
4248
4250
4249
for (unsigned i : indices(argTypes)) {
4251
4250
auto argType = argTypes[i];
4252
- auto *assocType = assocTypes[i]->getAssociatedTypeAnchor();
4253
4251
bool found = false;
4254
4252
for (auto fromReq : fromReqs) {
4255
- if (fromReq.first == assocType ) {
4253
+ if (fromReq.first == assocTypes[i]->getName() ) {
4256
4254
// FIXME: Extend the locator path to point to the argument
4257
4255
// inducing the requirement.
4258
4256
auto result = matchTypes(fromReq.second, argType,
0 commit comments