mirror of
https://github.com/golang/go
synced 2024-11-19 02:34:44 -07:00
719fbf7c21
Fixes golang/go#32414 Change-Id: If08e655d7a0e29b0865c13d8377e98be01cf24c5 Reviewed-on: https://go-review.googlesource.com/c/tools/+/184777 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
66 lines
1.2 KiB
Go
66 lines
1.2 KiB
Go
// +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 _() {
|
|
_ = S{}.; //@complete(";", Bf, Af, Cf)
|
|
}
|
|
|
|
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 }
|
|
|
|
func (b *bob) george() *george {} //@item(george, "george", "func() *george", "method")
|
|
func (g *george) jack() *jack {}
|
|
func (j *jack) jill() *jill {} //@item(jill, "jill", "func() *jill", "method")
|
|
|
|
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
|
|
} |