File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -142,20 +142,20 @@ PackConformance *PackConformance::getAssociatedConformance(
142142 auto packElement = ConformingType->getElementType (i);
143143
144144 if (auto *packExpansion = packElement->getAs <PackExpansionType>()) {
145- auto assocTypePattern = conformances[i].getAssociatedType (assocType);
146- packElements.push_back (PackExpansionType::get (
147- assocTypePattern, packExpansion->getCountType ()));
148-
149145 auto assocConformancePattern =
150146 conformances[i].getAssociatedConformance (assocType, protocol);
151147 packConformances.push_back (assocConformancePattern);
152- } else {
153- auto assocTypeScalar = conformances[i].getAssociatedType (assocType);
154- packElements.push_back (assocTypeScalar);
155148
149+ auto assocTypePattern = assocConformancePattern.getType ();
150+ packElements.push_back (PackExpansionType::get (
151+ assocTypePattern, packExpansion->getCountType ()));
152+ } else {
156153 auto assocConformanceScalar =
157154 conformances[i].getAssociatedConformance (assocType, protocol);
158155 packConformances.push_back (assocConformanceScalar);
156+
157+ auto assocTypeScalar = assocConformanceScalar.getType ();
158+ packElements.push_back (assocTypeScalar);
159159 }
160160 }
161161
You can’t perform that action at this time.
0 commit comments