2018-11-14 19:11:16 -07:00
|
|
|
package b
|
|
|
|
|
2019-05-10 08:32:25 -06:00
|
|
|
import (
|
|
|
|
myFoo "golang.org/x/tools/internal/lsp/foo" //@godef("foo", PackageFoo),godef("myFoo", PackageFoo)
|
|
|
|
"golang.org/x/tools/internal/lsp/godef/a" //@mark(AImport, "\"")
|
|
|
|
)
|
2018-11-14 19:11:16 -07:00
|
|
|
|
|
|
|
type S1 struct { //@S1
|
|
|
|
F1 int //@mark(S1F1, "F1")
|
|
|
|
S2 //@godef("S2", S2), mark(S1S2, "S2")
|
|
|
|
a.A //@godef("A", A)
|
|
|
|
}
|
|
|
|
|
|
|
|
type S2 struct { //@S2
|
2019-04-19 09:10:38 -06:00
|
|
|
F1 string //@mark(S2F1, "F1")
|
|
|
|
F2 int //@mark(S2F2, "F2")
|
2019-05-10 08:32:25 -06:00
|
|
|
*a.A //@godef("A", A),godef("a",AImport)
|
2019-04-19 09:10:38 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type S3 struct {
|
|
|
|
F1 struct {
|
|
|
|
a.A //@godef("A", A)
|
|
|
|
}
|
2018-11-14 19:11:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func Bar() {
|
|
|
|
a.Stuff() //@godef("Stuff", Stuff)
|
|
|
|
var x S1 //@godef("S1", S1)
|
|
|
|
_ = x.S2 //@godef("S2", S1S2)
|
|
|
|
_ = x.F1 //@godef("F1", S1F1)
|
|
|
|
_ = x.F2 //@godef("F2", S2F2)
|
|
|
|
_ = x.S2.F1 //@godef("F1", S2F1)
|
2019-05-10 08:32:25 -06:00
|
|
|
|
|
|
|
var _ *myFoo.StructFoo
|
2018-11-14 19:11:16 -07:00
|
|
|
}
|