Skip to content

[6.4] Sema: ignore macro in qualified import#89370

Merged
hamishknight merged 1 commit into
swiftlang:release/6.4.xfrom
dduan:release/6.4.x
May 24, 2026
Merged

[6.4] Sema: ignore macro in qualified import#89370
hamishknight merged 1 commit into
swiftlang:release/6.4.xfrom
dduan:release/6.4.x

Conversation

@dduan
Copy link
Copy Markdown
Contributor

@dduan dduan commented May 22, 2026

6.4 cherry-pick of #88447

  • Explanation: Fixes an issue where a scoped import would incorrectly diagnose an ambiguity if a same-named macro is present in the overload set. This requires also filtering out macro results from name lookups where a scoped import is used
  • Scope: Affects scoped import validation and name lookup
  • Issue: rdar://174526734
  • Risk: Low/Medium - While this does exclude results from name lookup, in practice we would have previously rejected any attempt at doing a scoped import if a macro were in scope for that access path
  • Testing: Added tests to test suite
  • Reviewer: Hamish Knight

…lified-imports

Qualified import for macro has not been implemented. Until then, ignore macros in lookup so that a macro and a struct sharing the same name won't cause ambiguity.

rdar://174526734
@dduan dduan requested a review from a team as a code owner May 22, 2026 19:17
@hamishknight
Copy link
Copy Markdown
Contributor

@swift-ci please test

@hamishknight hamishknight changed the title Sema: ignore macro in qualified import [6.4] Sema: ignore macro in qualified import May 22, 2026
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.4 labels May 22, 2026
@hamishknight
Copy link
Copy Markdown
Contributor

@swift-ci please test macOS

@hamishknight hamishknight merged commit 5f2c09f into swiftlang:release/6.4.x May 24, 2026
6 checks passed
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 swift 6.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants