Skip to content

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