Repository navigation
🐛 fix(check): type argument selectors on unknown input and self[...] - #2705
Merged
Merged
Conversation
missing_else_in_expr no longer reports an if at the end of a pipeline, which is the documented way to drop a node. prefer_specific_heading no longer reports .h in queries that read .depth or .level.
A selector argument without a known input type is now an unresolved type variable, since it may select from a node or an array of nodes (nodes | compact(.code)). self[0] and self[:n] are no longer reported as unresolved symbols.
missing_else_in_expr looked for later stages only among symbols added with add_symbol, so an if followed by .h1 or let x = 2 was treated as the end of the pipeline and its warning was suppressed.
self[i] and self[a:b] now index or slice the piped input like a variable does, instead of leaving the result unconstrained. Children of an argument selector on unknown input are checked against the selected node kind, so compact(.code.depth) reports the missing attribute while the selector's own result still varies with its input.
self[0][1] has two bracket groups with one index each, but two children were always routed to the slice overload, so the result was an array. bracket_group_count now tells a chain from a slice, and each index is applied to the previous result. A chain mixed with slices stays unconstrained. DeferredTupleAccess carries the result type so the intermediate steps need no symbol.
harehare
force-pushed
the
fix/check-lint-false-positives
branch
from
October 27, 2026 13:52
67f9407 to
dd2fdd9
Compare
Chained lookups like self[0][0][0][0] resolve one level per pass, but the checker ran the deferred tuple access resolver a fixed three times, leaving the fourth element untyped. Drain the resolver until it makes no progress.
harehare
force-pushed
the
fix/check-lint-false-positives
branch
from
October 28, 2026 10:49
10b407b to
6b85bac
Compare
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.
Summary
Type of Change
Checklist
cargo fmtandcargo clippyand addressed any warningsjust test-alland all tests pass/docs, crateREADME.md) if neededAdditional Context