@@ -667,7 +667,7 @@ struct GenericSignatureBuilder::Implementation {
667
667
SmallSetVector<ExplicitRequirement, 2 > ExplicitRequirements;
668
668
669
669
// / All explicit same-type requirements that were added to the builder.
670
- SmallVector<Requirement , 2 > ExplicitSameTypeRequirements;
670
+ SmallVector<ExplicitRequirement , 2 > ExplicitSameTypeRequirements;
671
671
672
672
// / A mapping of redundant explicit requirements to the best root requirement
673
673
// / that implies them. Built by computeRedundantRequirements().
@@ -4915,7 +4915,7 @@ GenericSignatureBuilder::addSameTypeRequirementBetweenTypeParameters(
4915
4915
4916
4916
if (!source->isDerivedRequirement ()) {
4917
4917
Impl->ExplicitSameTypeRequirements .emplace_back (RequirementKind::SameType,
4918
- depType1, depType2 );
4918
+ source, depType1 );
4919
4919
}
4920
4920
4921
4921
// Record the same-type constraint, and bail out if it was already known.
@@ -5142,8 +5142,7 @@ ConstraintResult GenericSignatureBuilder::addSameTypeRequirementToConcrete(
5142
5142
const RequirementSource *source) {
5143
5143
if (!source->isDerivedRequirement ()) {
5144
5144
Impl->ExplicitSameTypeRequirements .emplace_back (RequirementKind::SameType,
5145
- type.getDependentType (*this ),
5146
- concrete);
5145
+ source, concrete);
5147
5146
}
5148
5147
5149
5148
auto equivClass = type.getEquivalenceClass (*this );
@@ -8472,8 +8471,8 @@ GenericSignature GenericSignatureBuilder::rebuildSignatureWithoutRedundantRequir
8472
8471
}
8473
8472
};
8474
8473
8475
- auto subjectType = resolveType (req.getFirstType ());
8476
- auto constraintType = resolveType (req.getSecondType ());
8474
+ auto subjectType = resolveType (req.getSubjectType ());
8475
+ auto constraintType = resolveType (req.getRHS (). get <Type> ());
8477
8476
8478
8477
auto newReq = stripBoundDependentMemberTypes (
8479
8478
Requirement (RequirementKind::SameType,
0 commit comments