Skip to content

Commit 5ad254b

Browse files
committed
[GSB] Stop walking associated types of a protocol just due to a superclass req.
1 parent 0416292 commit 5ad254b

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3735,26 +3735,7 @@ bool GenericSignatureBuilder::updateSuperclass(
37353735
// when the superclass constraint changes.
37363736
auto updateSuperclassConformances = [&] {
37373737
for (const auto &conforms : equivClass->conformsTo) {
3738-
auto proto = conforms.first;
3739-
if (auto superSource = resolveSuperConformance(type, proto)) {
3740-
for (auto assocType : proto->getAssociatedTypeMembers()) {
3741-
// Only do this for the anchor.
3742-
if (assocType != assocType->getAssociatedTypeAnchor())
3743-
continue;
3744-
3745-
// FIXME: More efficient way to extend resolved type?
3746-
Type nestedType =
3747-
DependentMemberType::get(type.getDependentType(*this), assocType);
3748-
if (auto nested =
3749-
maybeResolveEquivalenceClass(
3750-
nestedType,
3751-
ArchetypeResolutionKind::AlreadyKnown,
3752-
/*wantExactPotentialArchetype=*/true)) {
3753-
maybeAddSameTypeRequirementForNestedType(nested, superSource,
3754-
*this);
3755-
}
3756-
}
3757-
}
3738+
(void)resolveSuperConformance(type, conforms.first);
37583739
}
37593740
};
37603741

0 commit comments

Comments
 (0)