1
0
mirror of https://github.com/golang/go synced 2024-11-19 11:04:47 -07:00
go/internal/lsp/testdata/interfacerank/interface_rank.go

24 lines
397 B
Go
Raw Normal View History

package interfacerank
type foo interface {
foo()
}
type fooImpl int
func (*fooImpl) foo() {}
func wantsFoo(foo) {}
func _() {
var (
aa string //@item(irAA, "aa", "string", "var")
ab *fooImpl //@item(irAB, "ab", "*fooImpl", "var")
)
wantsFoo(a) //@complete(")", irAB, irAA)
var ac fooImpl //@item(irAC, "ac", "fooImpl", "var")
wantsFoo(&a) //@complete(")", irAC, irAA, irAB)
}