@@ -97,7 +97,9 @@ PackConformance *PackConformance::getCanonicalConformance() const {
9797// / Project the corresponding associated type from each pack element
9898// / of the conforming type, collecting the results into a new pack type
9999// / that has the same pack expansion structure as the conforming type.
100- PackType *PackConformance::getAssociatedType (Type assocType) const {
100+ PackType *PackConformance::getTypeWitness (
101+ AssociatedTypeDecl *assocType,
102+ SubstOptions options) const {
101103 SmallVector<Type, 4 > packElements;
102104
103105 auto conformances = getPatternConformances ();
@@ -110,8 +112,8 @@ PackType *PackConformance::getAssociatedType(Type assocType) const {
110112 // conformance.
111113 if (auto *packExpansion = packElement->getAs <PackExpansionType>()) {
112114 auto assocTypePattern =
113- conformances[i].getAssociatedType (packExpansion->getPatternType (),
114- assocType);
115+ conformances[i].getTypeWitness (packExpansion->getPatternType (),
116+ assocType, options );
115117
116118 packElements.push_back (PackExpansionType::get (
117119 assocTypePattern, packExpansion->getCountType ()));
@@ -120,7 +122,7 @@ PackType *PackConformance::getAssociatedType(Type assocType) const {
120122 // the associated type witness from the pattern conformance.
121123 } else {
122124 auto assocTypeScalar =
123- conformances[i].getAssociatedType (packElement, assocType);
125+ conformances[i].getTypeWitness (packElement, assocType, options );
124126 packElements.push_back (assocTypeScalar);
125127 }
126128 }
0 commit comments