Skip to content

[Macros] Allow macro parameters to have default arguments. #64723

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
Mar 29, 2023

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Mar 29, 2023

SE-0382 allows macro parameters to have default arguments. Enable these default arguments, with the normal type checking rules. One significant quirk to this implementation is that the actual default argument values don't make it to the macro implementation. This is a previously-unconsidered design problem we'll need to address.

Tracked by rdar://104043987.

(cherry picked from commit 9d9f832, #64631)

SE-0382 allows macro parameters to have default arguments. Enable these
default arguments, with the normal type checking rules. One
significant quirk to this implementation is that the actual default
argument values don't make it to the macro implementation. This is a
previously-unconsidered design problem we'll need to address.

Tracked by rdar://104043987.

(cherry picked from commit 9d9f832)
@DougGregor DougGregor requested a review from a team as a code owner March 29, 2023 16:38
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 4928f54 into swiftlang:release/5.9 Mar 29, 2023
@DougGregor DougGregor deleted the macro-default-args-5.9 branch March 29, 2023 21:05
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants