Skip to content

[Macros] Checking expression macro as caller-side default argument #2447

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

Conversation

ApolloZhu
Copy link
Contributor

@ApolloZhu ApolloZhu commented Jan 29, 2024

Companion for swiftlang/swift#70602 to allow only literals as arguments in a macro expression used as a default argument

Note

This also impact accepted literals as mentioned in SE-0382 that

  • Negative numbers are now accepted
  • String interpolations are no longer accepted, even if all the interpolated expressions are literals or parameter references

@ApolloZhu ApolloZhu requested a review from ahoppen January 30, 2024 19:09
@ApolloZhu ApolloZhu force-pushed the macro/expression-as-default-argument branch from 95c2c59 to a71b141 Compare February 6, 2024 23:32
@ApolloZhu
Copy link
Contributor Author

@swift-ci please test

@ApolloZhu
Copy link
Contributor Author

@swift-ci please test

@ahoppen
Copy link
Member

ahoppen commented Feb 9, 2024

@swift-ci please test Windows

@DougGregor DougGregor merged commit 2f5dd64 into swiftlang:main Feb 15, 2024
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.

3 participants