diagnostic: Fix unused import for method overloads#798
Merged
Conversation
`lowering/unused-import` could flag `import Base: show` even when the import was required to define an unqualified method extension: ```julia import Base: show show(io::IO, x::T) = ... ``` Track method-definition occurrences separately from ordinary global definitions, while still treating them as definition sites for navigation, document-highlight, and semantic-token features. The unused-import diagnostic now suppresses these names only for explicit `import` statements, not `using` statements. Validation covered the unused-import diagnostic tests, occurrence analysis, method definition lookup, semantic tokens, document highlights, and `./scripts/selfcheck.sh`. Co-Authored-By: GPT-5.5 <noreply@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #798 +/- ##
==========================================
+ Coverage 78.29% 78.31% +0.01%
==========================================
Files 62 62
Lines 13096 13105 +9
==========================================
+ Hits 10254 10263 +9
Misses 2842 2842
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.
lowering/unused-importcould flagimport Base: showeven when the import was required to define an unqualified method extension:Track method-definition occurrences separately from ordinary global definitions, while still treating them as definition sites for navigation, document-highlight, and semantic-token features. The unused-import diagnostic now suppresses these names only for explicit
importstatements, notusingstatements.Validation covered the unused-import diagnostic tests, occurrence analysis, method definition lookup, semantic tokens, document highlights, and
./scripts/selfcheck.sh.