Conversation
Previously, `collect_inert_global_occurrences!` was only called for `@generated` functions, so imports used inside quoted expressions (`:(...)`) in macro bodies or helper functions were falsely reported as unused. Remove the `is_generated` guard so that global bindings inside inert nodes are always collected during binding occurrence analysis. Additionally, strip `$` (interpolation) nodes via `without_kinds` before lowering inert content, so that non-interpolated identifiers in expressions like `:(length(($x,)))` are still resolved. Closes #594 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #595 +/- ##
==========================================
- Coverage 67.87% 67.87% -0.01%
==========================================
Files 51 51
Lines 8303 8302 -1
==========================================
- Hits 5636 5635 -1
Misses 2667 2667
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 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.
Previously,
collect_inert_global_occurrences!was only called for@generatedfunctions, so imports used inside quoted expressions (:(...)) in macro bodies or helper functions were falsely reported as unused. Remove theis_generatedguard so that global bindings inside inert nodes are always collected during binding occurrence analysis.Additionally, strip
$(interpolation) nodes viawithout_kindsbefore lowering inert content, so that non-interpolated identifiers in expressions like:(length(($x,)))are still resolved.Closes #594