[5.9][SE-0393] Require the repeat
keyword for generic requirement expansions
#65145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #65134
Explanation: The review of SE-0393 surfaced a potential ambiguity between parameter pack requirement expansions and requirements on a single pack element on a local function inside of a pack expansion expression. The proposal is revised in [SE-0393] Incorporate revisions from review discussion. swift-evolution#2004 to require the
repeat
keyword for generic requirement expansions to resolve the ambiguity.Scope: Only affects parameter packs.
Risk: Low.
Testing: Updated existing parameter pack tests and added new test for error messages for
each T
in requirements outside of an expansion.