mirror of
https://github.com/golang/go
synced 2024-11-06 19:56:15 -07:00
2e68ad74ea
Fix objects defined in the function signature to only be completable inside the function body. For example: func (dog Dog) bark(d<>) { // Don't complete <> to "dog". d<> // Do complete <> to "dog". } Change-Id: Ic9a2dc2ce6771212780f2d6af2221a67d203f35f Reviewed-on: https://go-review.googlesource.com/c/tools/+/196559 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
10 lines
260 B
Go
10 lines
260 B
Go
package funcsig
|
|
|
|
type someType int //@item(sigSomeType, "someType", "int", "type")
|
|
|
|
// Don't complete "foo" in signature.
|
|
func (foo someType) _() { //@item(sigFoo, "foo", "someType", "var"),complete(") {", sigSomeType)
|
|
|
|
//@complete("", sigFoo, sigSomeType)
|
|
}
|