1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:34:41 -07:00
go/internal/lsp/testdata/funcvalue/func_value.go
Rebecca Stambler 719fbf7c21 internal/lsp: move function signature into detail instead of label
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>
2019-07-03 21:07:46 +00:00

28 lines
688 B
Go

package funcvalue
func fooFunc() int { //@item(fvFooFunc, "fooFunc", "func() int", "func")
return 0
}
var _ = fooFunc() //@item(fvFooFuncCall, "fooFunc", "func() int", "func")
var fooVar = func() int { //@item(fvFooVar, "fooVar", "func() int", "var")
return 0
}
var _ = fooVar() //@item(fvFooVarCall, "fooVar", "func() int", "var")
type myFunc func() int
var fooType myFunc = fooVar //@item(fvFooType, "fooType", "myFunc", "var")
var _ = fooType() //@item(fvFooTypeCall, "fooType", "func() int", "var")
func _() {
var f func() int
f = foo //@complete(" //", fvFooFunc, fvFooType, fvFooVar)
var i int
i = foo //@complete(" //", fvFooFuncCall, fvFooTypeCall, fvFooVarCall)
}