@@ -4207,7 +4207,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4207
4207
4208
4208
// Finally, check parameterized protocol requirements.
4209
4209
if (!layout.getParameterizedProtocols().empty()) {
4210
- SmallVector<std::pair<AssociatedTypeDecl * , Type>, 4> fromReqs;
4210
+ SmallVector<std::pair<Identifier , Type>, 4> fromReqs;
4211
4211
4212
4212
if (type1->isExistentialType()) {
4213
4213
auto fromLayout = type1->getExistentialLayout();
@@ -4218,8 +4218,7 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4218
4218
4219
4219
for (unsigned i : indices(argTypes)) {
4220
4220
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));
4223
4222
}
4224
4223
}
4225
4224
}
@@ -4234,10 +4233,9 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
4234
4233
4235
4234
for (unsigned i : indices(argTypes)) {
4236
4235
auto argType = argTypes[i];
4237
- auto *assocType = assocTypes[i]->getAssociatedTypeAnchor();
4238
4236
bool found = false;
4239
4237
for (auto fromReq : fromReqs) {
4240
- if (fromReq.first == assocType ) {
4238
+ if (fromReq.first == assocTypes[i]->getName() ) {
4241
4239
// FIXME: Extend the locator path to point to the argument
4242
4240
// inducing the requirement.
4243
4241
auto result = matchTypes(fromReq.second, argType,
0 commit comments