Skip to content

[5.9] [Macros] Ensure that we find operators in any macro-expanded context. #68086

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

Conversation

DougGregor
Copy link
Member

In any nominal declaration or extension thereof that is produced by a macro expansion, make sure we perform qualified name lookup when resolving operators so that we're guaranteed to find the macro-introduced operators. Otherwise, expanding a macro that defines a new type with conformances involving operators doesn't work.

Fixes rdar://114257019, cherry-picked from #68085

In any nominal declaration or extension thereof that is produced by a
macro expansion, make sure we perform qualified name lookup when
resolving operators so that we're guaranteed to find the
macro-introduced operators. Otherwise, expanding a macro that defines
a new type with conformances involving operators doesn't work.

Fixes rdar://114257019,
@DougGregor DougGregor requested a review from a team as a code owner August 23, 2023 11:59
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor changed the title [Macros] Ensure that we find operators in any macro-expanded context. [5.9] [Macros] Ensure that we find operators in any macro-expanded context. Aug 23, 2023
@DougGregor DougGregor merged commit 7ffce19 into swiftlang:release/5.9 Aug 23, 2023
@DougGregor DougGregor deleted the macro-expansion-with-operators-5.9 branch August 23, 2023 16:57
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