godef
godef copied to clipboard
fix crash when find the map's element which its defination in other f…
when we find a map's element which its defination is located in another file, it will crash.
Signed-off-by: Tw [email protected]
Assume there are two files:
// 1.go
type A struct{}
// 2.go
m := make(map[string]A)
if elm, ok := m["test"]; ok {
// do something
}
if we find elm definition, godef will crash.
LGTM, thanks! Please fix conflicts and I will merge.
Done.