@@ -7559,9 +7559,10 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifySubclassOfConstraint(
75597559 for (unsigned i = 0, e = packType->getNumElements(); i < e; ++i) {
75607560 auto eltType = packType->getElementType(i);
75617561 if (auto *packExpansionType = eltType->getAs<PackExpansionType>()) {
7562- // FIXME: Locator element for pack expansion pattern
7562+ auto patternLoc =
7563+ locator.withPathElement(ConstraintLocator::PackExpansionPattern);
75637564 addConstraint(ConstraintKind::SubclassOf, packExpansionType->getPatternType(),
7564- classType, locator.withPathElement(LocatorPathElt::PackElement(i)) );
7565+ classType, patternLoc );
75657566 } else {
75667567 addConstraint(ConstraintKind::SubclassOf, eltType,
75677568 classType, locator.withPathElement(LocatorPathElt::PackElement(i)));
@@ -7677,11 +7678,12 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
76777678 for (unsigned i = 0, e = packType->getNumElements(); i < e; ++i) {
76787679 auto eltType = packType->getElementType(i);
76797680 if (auto *packExpansionType = eltType->getAs<PackExpansionType>()) {
7680- // FIXME: Locator element for pack expansion pattern
7681+ auto patternLoc =
7682+ locator.withPathElement(ConstraintLocator::PackExpansionPattern);
76817683 addConstraint(ConstraintKind::ConformsTo,
76827684 packExpansionType->getPatternType(),
76837685 protocol->getDeclaredInterfaceType(),
7684- locator.withPathElement(LocatorPathElt::PackElement(i)) );
7686+ patternLoc );
76857687 } else {
76867688 addConstraint(ConstraintKind::ConformsTo, eltType,
76877689 protocol->getDeclaredInterfaceType(),
0 commit comments