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
this.method() links an imported function of the same name instead of the class's own method #3034
Inside a class that has a method with the same name as an imported function (a common thin-wrapper pattern), this.find(...) links to the imported function, not to the class's own method.
// lib.tsexportfunctionfind(x: string): string{returnx;}// handler.tsimport{find}from'./lib';exportclassHandler{run(s: string): string{returnthis.find(s);// should be Handler.find}privatefind(s: string): string{returnfind(s);// the imported function, correctly}}
Expected: Handler.run calls Handler::find.
Actual on main (60b0d7a): Handler.run calls lib.ts: find, with resolvedBy: import.
this. is an explicit receiver, so an import binding of the bare name should never satisfy it. codegraph's own source has 7 such sites; for example, ToolHandler calls this.findAllSymbols(...), which wraps the imported findAllSymbols, and this.groupDefinitions(...) is the same. Callers of the wrapper method are missing as a result, and the imported function shows callers it doesn't have.
Found by diffing codegraph's call edges against scip-typescript (the TypeScript compiler's references) on codegraph's own repo.
Activity
inth3shadows commentedon Oct 29, 2026
Duplicate of #2954, which I filed earlier for the same bug. The real cases found here are added there as a comment.