binding/occurrence: Resolve new-style macros by object identity#802
Merged
Conversation
Qualified and aliased new-style macros such as `Test.@test` were classified by source spelling. This missed aliases and could preserve unrelated user-defined macros with the same name, producing incorrect binding results in references, rename, highlights, and diagnostics. Resolve source macro names in the request module and world, then compare the resulting macro object with the registered defining-module binding. Thread the captured world through lowering and binding selection so all related analyses use a consistent snapshot. Nested module bodies switch to their resolved module context. Preserved new-style calls still recurse into their arguments so nested old-style calls and `@static` are handled. Coverage includes qualified, aliased, same-named, nested-module, and generated/eval cases. Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
aviatesk
force-pushed
the
fix-macro-resolution
branch
from
July 19, 2026 05:06
c297b81 to
a959edb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #802 +/- ##
==========================================
+ Coverage 78.59% 78.61% +0.01%
==========================================
Files 62 62
Lines 13398 13418 +20
==========================================
+ Hits 10530 10548 +18
- Misses 2868 2870 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qualified and aliased new-style macros such as
Test.@testwere classified by source spelling. This missed aliases and could preserve unrelated user-defined macros with the same name, producing incorrect binding results in references, rename, highlights, and diagnostics.Resolve source macro names in the request module and world, then compare the resulting macro object with the registered defining-module binding. Thread the captured world through lowering and binding selection so all related analyses use a consistent snapshot. Nested module bodies switch to their resolved module context.
Preserved new-style calls still recurse into their arguments so nested old-style calls and
@staticare handled. Coverage includes qualified, aliased, same-named, nested-module, and generated/eval cases.