@@ -440,6 +440,9 @@ enum class FixKind : uint8_t {
440440 // / Allow pack expansion expressions in a context that does not support them.
441441 AllowInvalidPackExpansion,
442442
443+ // / Ignore `where` clause in a for-in loop with a pack expansion expression.
444+ IgnoreWhereClauseInPackIteration,
445+
443446 // / Allow a pack expansion parameter of N elements to be matched
444447 // / with a single tuple literal argument of the same arity.
445448 DestructureTupleToMatchPackExpansionParameter,
@@ -2223,6 +2226,26 @@ class AllowInvalidPackExpansion final : public ConstraintFix {
22232226 }
22242227};
22252228
2229+ class IgnoreWhereClauseInPackIteration final : public ConstraintFix {
2230+ IgnoreWhereClauseInPackIteration (ConstraintSystem &cs,
2231+ ConstraintLocator *locator)
2232+ : ConstraintFix(cs, FixKind::IgnoreWhereClauseInPackIteration, locator) {}
2233+
2234+ public:
2235+ std::string getName () const override {
2236+ return " ignore where clause in pack iteration" ;
2237+ }
2238+
2239+ bool diagnose (const Solution &solution, bool asNote = false ) const override ;
2240+
2241+ static IgnoreWhereClauseInPackIteration *create (ConstraintSystem &cs,
2242+ ConstraintLocator *locator);
2243+
2244+ static bool classof (const ConstraintFix *fix) {
2245+ return fix->getKind () == FixKind::IgnoreWhereClauseInPackIteration;
2246+ }
2247+ };
2248+
22262249class CollectionElementContextualMismatch final
22272250 : public ContextualMismatch,
22282251 private llvm::TrailingObjects<CollectionElementContextualMismatch,
0 commit comments