2018-11-13 09:13:53 -07:00
|
|
|
// +build go1.11
|
|
|
|
|
|
|
|
package selector
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/tools/internal/lsp/bar"
|
|
|
|
)
|
|
|
|
|
|
|
|
type S struct {
|
|
|
|
B, A, C int //@item(Bf, "B", "int", "field"),item(Af, "A", "int", "field"),item(Cf, "C", "int", "field")
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
2019-12-27 13:45:09 -07:00
|
|
|
_ = S{}.; //@complete(";", Af, Bf, Cf)
|
2018-11-13 09:13:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type bob struct { a int } //@item(a, "a", "int", "field")
|
|
|
|
type george struct { b int }
|
|
|
|
type jack struct { c int } //@item(c, "c", "int", "field")
|
|
|
|
type jill struct { d int }
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
func (b *bob) george() *george {} //@item(george, "george", "func() *george", "method")
|
2018-11-13 09:13:53 -07:00
|
|
|
func (g *george) jack() *jack {}
|
2019-07-02 16:10:05 -06:00
|
|
|
func (j *jack) jill() *jill {} //@item(jill, "jill", "func() *jill", "method")
|
2018-11-13 09:13:53 -07:00
|
|
|
|
|
|
|
func _() {
|
|
|
|
b := &bob{}
|
|
|
|
y := b.george().
|
|
|
|
jack();
|
|
|
|
y.; //@complete(";", jill, c)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
bar. //@complete(" /", Bar)
|
|
|
|
x := 5
|
|
|
|
|
|
|
|
var b *bob
|
|
|
|
b. //@complete(" /", george, a)
|
|
|
|
y, z := 5, 6
|
|
|
|
|
|
|
|
b. //@complete(" /", george, a)
|
|
|
|
y, z, a, b, c := 5, 6
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
bar. //@complete(" /", Bar)
|
|
|
|
bar.Bar()
|
|
|
|
|
|
|
|
bar. //@complete(" /", Bar)
|
|
|
|
go f()
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
var b *bob
|
|
|
|
if y != b. //@complete(" /", george, a)
|
|
|
|
z := 5
|
|
|
|
|
|
|
|
if z + y + 1 + b. //@complete(" /", george, a)
|
|
|
|
r, s, t := 4, 5
|
|
|
|
|
|
|
|
if y != b. //@complete(" /", george, a)
|
|
|
|
z = 5
|
|
|
|
|
|
|
|
if z + y + 1 + b. //@complete(" /", george, a)
|
|
|
|
r = 4
|
|
|
|
}
|