mirror of
https://github.com/golang/go
synced 2024-11-18 21:54:49 -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>
47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
// +build go1.11
|
|
|
|
package bar
|
|
|
|
import (
|
|
"golang.org/x/tools/internal/lsp/foo" //@item(foo, "foo", "\"golang.org/x/tools/internal/lsp/foo\"", "package")
|
|
)
|
|
|
|
func helper(i foo.IntFoo) {} //@item(helper, "helper", "func(i foo.IntFoo)", "func")
|
|
|
|
func _() {
|
|
help //@complete("l", helper)
|
|
_ = foo.StructFoo{} //@complete("S", Foo, IntFoo, StructFoo)
|
|
}
|
|
|
|
func Bar() { //@item(Bar, "Bar", "func()", "func")
|
|
foo.Foo() //@complete("F", Foo, IntFoo, StructFoo)
|
|
var _ foo.IntFoo //@complete("I", Foo, IntFoo, StructFoo)
|
|
foo.() //@complete("(", Foo, IntFoo, StructFoo)
|
|
}
|
|
|
|
func _() {
|
|
var Valentine int //@item(Valentine, "Valentine", "int", "var")
|
|
|
|
_ = foo.StructFoo{
|
|
Valu //@complete(" //", Value)
|
|
}
|
|
_ = foo.StructFoo{
|
|
Va //@complete("a", Value, Valentine)
|
|
}
|
|
_ = foo.StructFoo{
|
|
Value: 5, //@complete("a", Value)
|
|
}
|
|
_ = foo.StructFoo{
|
|
//@complete("", Value, Valentine, foo, Bar, helper)
|
|
}
|
|
_ = foo.StructFoo{
|
|
Value: Valen //@complete("le", Valentine)
|
|
}
|
|
_ = foo.StructFoo{
|
|
Value: //@complete(" //", Valentine, foo, Bar, helper)
|
|
}
|
|
_ = foo.StructFoo{
|
|
Value: //@complete(" ", Valentine, foo, Bar, helper)
|
|
}
|
|
}
|