You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JavaScript resolver links block-scoped object-shorthand variables to unrelated functions #2606
Graphify emits an indirect_call edge from a function that uses a block-scoped loop variable in an object-shorthand argument to an unrelated top-level function with the same name in another file.
No edge from findNamed() to the unrelated entry() declaration. The entry at the reported source location is a for...of lexical binding used as an object-shorthand property, not a callable identifier.
Impact
A generic fixture/helper name can become a false high-betweenness hub when this pattern appears across many files, distorting god-node and community analysis.
Suggested regression test
Build the two-file corpus above and assert there is no indirect_call edge from consumer_findnamed to declaration_entry. A positive control should retain the real fixture → entry() call.
Filed #2822 for the other side of this collector, since the two are easy to conflate.
This issue is a loop binding not shadowing inside its own loop. The v0.9.42 hunk that
addresses it folds the binding into _js_local_bound_names' function-wide set, and that set is
also consulted for references outside the loop — so for (const k of …) …; p.submit(k) now
loses a genuine edge to a same-named module callable. Same for an ordinary if-block const,
which reaches the same set through the variable_declarator arm.
Worth noting for anyone fixing either: the in-loop behaviour reported here is correct on v0.9.45
and has to stay correct — it is a control row in #2822.
Activity
imagineers-tyler commentedon Aug 17, 2026
Filed #2822 for the other side of this collector, since the two are easy to conflate.
This issue is a loop binding not shadowing inside its own loop. The v0.9.42 hunk that
addresses it folds the binding into
_js_local_bound_names' function-wide set, and that set isalso consulted for references outside the loop — so
for (const k of …) …; p.submit(k)nowloses a genuine edge to a same-named module callable. Same for an ordinary
if-blockconst,which reaches the same set through the
variable_declaratorarm.Worth noting for anyone fixing either: the in-loop behaviour reported here is correct on v0.9.45
and has to stay correct — it is a control row in #2822.
omsenjalia commentedon Oct 18, 2026
This looks fixed on the
v8branch by 873b5ebd (Add regression tests for block scoped let/const shadowing). Could a maintainer confirm and close?