Skip to content
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

[Macros] Enable global peer macros. #63598

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Conversation

hborla
Copy link
Member

@hborla hborla commented Feb 11, 2023

Global peer macro expansions are not injected into the AST. Instead, they are visited as "auxiliary declarations" when needed, such as in the decl checker and during SILGen. This is the same mechanism used for local property wrappers and local lazy variables.

Note that peer macros are not yet expanded during name lookup.

@hborla
Copy link
Member Author

hborla commented Feb 11, 2023

@swift-ci please build toolchain

@hborla hborla marked this pull request as draft February 11, 2023 20:02
@xedin xedin removed their request for review February 13, 2023 21:06
@hborla hborla marked this pull request as ready for review February 14, 2023 03:27
@hborla
Copy link
Member Author

hborla commented Feb 14, 2023

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Feb 14, 2023

@swift-ci please smoke test macOS

Global peer macro expansions are not injected into the AST. Instead, they
are visited as "auxiliary declarations" when needed, such as in the decl
checker and during SILGen. This is the same mechanism used for local property
wrappers and local lazy variables.
…criminator

when creating the macro expansion context.
@hborla
Copy link
Member Author

hborla commented Feb 15, 2023

@swift-ci please smoke test

@hborla hborla merged commit a18eebf into swiftlang:main Feb 15, 2023
@hborla hborla deleted the global-peer-macros branch February 15, 2023 04:15
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.

1 participant