fix(resolver): preserve qualified call resolution - #56
Draft
JohnXu22786 wants to merge 4 commits into
Draft
JohnXu22786 wants to merge 4 commits into
JohnXu22786 wants to merge 4 commits into
Conversation
Resolve qualified calls against imported candidates before applying the same-file bare-name fallback.
Re-resolve existing indexes after changing qualified-call precedence and keep local receiver methods ahead of imported name fallbacks.
Resolve local qualified owners relative to the call site so nested symbols do not shadow imported targets outside their scope, and invalidate prior resolver results.
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.
What this PR does
Before this PR:
Qualified calls could resolve to same-file symbols by final name before checking the imported qualifier. Local receiver/class calls could bind to imported same-name methods, nested local symbols could shadow imported owners outside their lexical scope, unchanged indexes could skip re-resolution after resolver changes, and qualified overloads could bind arbitrarily to the first declaration.
After this PR:
Qualified module calls resolve imported symbols correctly, while local receiver and class-qualified calls resolve within the caller's lexical scopes. Ambiguous qualified local names remain unresolved instead of selecting an arbitrary overload or duplicate declaration. Resolver-version changes force unchanged existing indexes through a full resolution pass. Regression tests cover fresh resolution, lexical scope, overload ambiguity, and stale incremental edges.
Type of change
fix