Skip to content

diagnostic: Fix unused import for method overloads#798

Merged
aviatesk merged 1 commit into
masterfrom
diagnostic-fix-import-extended
Jul 9, 2026
Merged

diagnostic: Fix unused import for method overloads#798
aviatesk merged 1 commit into
masterfrom
diagnostic-fix-import-extended

Conversation

@aviatesk

@aviatesk aviatesk commented Jul 9, 2026

Copy link
Copy Markdown
Owner

lowering/unused-import could flag import Base: show even when the import was required to define an unqualified method extension:

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.

`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

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.31%. Comparing base (506d5e0) to head (1c756cd).
⚠️ Report is 1 commits behind head on master.

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              
Flag Coverage Δ
JETLS.jl 78.31% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aviatesk aviatesk changed the title diagnostic: Fix unused import for method extensions diagnostic: Fix unused import for method overloads Jul 9, 2026
@aviatesk
aviatesk merged commit 8e014ff into master Jul 9, 2026
18 of 19 checks passed
@aviatesk
aviatesk deleted the diagnostic-fix-import-extended branch July 9, 2026 16:48
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.

1 participant