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
Go selectors on locals that shadow import aliases bind to the wrong package #5409
A Go call to a local receiver can be recorded as an EXTRACTED call into an unrelated imported package when the receiver shadows the import name.
Reproduction
On Graphify 0.9.115 with Python 3.14, create a Go module named example.com/m. Give store/store.go the package name store and functions Init and Save. In app/app.go write:
Run graphify extract . --code-only on the fresh corpus. The graph links both calls to the imported package. The second call should target Fake.Save.
The Go selector walker tests for the import name before looking at lexical bindings. Check the visible binding first and pass locally bound selectors to the receiver-type resolver. Add tests for calls before the declaration, inside and outside nested scopes, and through a shadowing parameter.
Activity
github-actions commentedon Nov 23, 2026
Thanks for opening this issue, @sdivyanshu90. 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(go): resolve shadowed imports as local receivers