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
JS: a variable captured from an enclosing function is not shadowed, so passing it as an argument fabricates an indirect_call to any same-named function in the corpus #5217
Related:#4448 (fixed in 0.9.91 for parameters of the callback itself). This is the remaining case.
Summary
When an identifier is a parameter of an enclosing function and is used as a call argument inside a nested function, the inner reference is treated as a free name and resolved corpus-wide. It binds to any function with the same name, even a non-exported function in a TypeScript file that nothing imports. A parameter used directly in its own function is shadowed correctly.
Reproduction
app/controller.js:
angular.module('app').controller('ListCtrl',function($scope,$ngConfirm){// A: param of the immediate nested function$scope.a=function(value){save(value);};// B: variable captured from an enclosing nested function$scope.remove=function(item){$ngConfirm({buttons: {confirm: {action: function(){doDelete(item);}}}});};// C: arrow param captured one level down$scope.load=function(rows){rows.forEach((entry)=>{if(entry){setTimeout(function(){show(entry);});}});};});
web/helpers.ts (not exported, not imported anywhere):
Case A (value) gives no edge, so the direct-parameter shadowing from #4448 works. Cases B and C do not: the reference sits in an inner function whose own scope does not declare the name, and the lookup does not walk out to the enclosing function's parameters before it falls back to the corpus.
Impact
In a real codebase that mixes an AngularJS frontend with a separate TypeScript app, this leaves 55 INFERRED indirect_call edges between two layers that never call each other. All of them go to functions with generic names such as scope(), entry(), value(), response() and item(). The edges also pull unrelated files into the same communities.
Suggested direction
When resolving a bare identifier used as a call argument, check the chain of enclosing function scopes (parameters and local declarations), not only the innermost one, before the corpus-wide fallback. A resolution that crosses into a non-exported symbol of a file that the caller does not import could also fail closed.
Activity
github-actions commentedon Nov 15, 2026
Thanks for opening this issue, @laurism-openelms. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
fix(js): shadow names captured from enclosing scopes in tracked neste…
chore: combine the schema-47 bump and add the 0.9.110 changelog
safishamsi commentedon Nov 15, 2026
Fixed by #5221 (ccb43e9), released in graphify 0.9.110. Thanks @laurism-openelms for the report and @Sidreyas for the fix.