mirror of
https://github.com/golang/go
synced 2024-11-19 02:44: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>
28 lines
688 B
Go
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)
|
|
}
|