Skip to content

[AST] Add the skeleton for PackExpansionExpr. #61523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

hborla
Copy link
Member

@hborla hborla commented Oct 10, 2022

This adds the AST node for PackExpansionExpr. These nodes will later be created in preCheckExpr when the operand of ... contains pack references. Another option is to resolve ... in the constraint system via disjunctions by adding the pack expansion operator to the overload set with the postfix ... operator, but I'm not yet sure whether that's necessary.

The type of a PackExpansionExpr will be a PackExpansionType whose pattern type is the type of the pattern expression. The pattern type contains SequenceArchetypes (to-be-renamed to PackArchetype or similar) for each pack reference in the expression pattern.

@hborla hborla requested a review from slavapestov October 10, 2022 15:19
@hborla
Copy link
Member Author

hborla commented Oct 10, 2022

@swift-ci please smoke test

@hborla hborla merged commit 464e54a into swiftlang:main Oct 10, 2022
@hborla hborla deleted the pack-expansion-expr branch October 10, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants