Repository navigation
Commit c46fd07
committed
feat(impact): Go callers from syntax facts
A Go package is its directory, and an import binds it by the path go.mod
gives it, an alias or a dot import. An unexported name never leaves its
package. A method call resolves when the syntax states the value's type
(a receiver, a parameter, `var x T`, `x := &pkg.T{}`), and is a
candidate from any file that can see the method's package otherwise. A
same-named function of another package, a struct field, a local and a
string are no longer callers.
Gate: go_callers_bind_through_the_package_and_the_stated_type, with
decoys of each kind; the lexical build finds 0 of 3 Total callers and
lists the field decoy, and finds no Reconcile caller.
Refs #5061 parent f57d4b9 commit c46fd07
5 files changed
Lines changed: 731 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| |||
0 commit comments