2019-06-19 16:24:05 -06:00
|
|
|
package funcvalue
|
|
|
|
|
|
|
|
func fooFunc() int { //@item(fvFooFunc, "fooFunc", "func() int", "func")
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
var _ = fooFunc() //@item(fvFooFuncCall, "fooFunc", "func() int", "func")
|
2019-06-19 16:24:05 -06:00
|
|
|
|
|
|
|
var fooVar = func() int { //@item(fvFooVar, "fooVar", "func() int", "var")
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
var _ = fooVar() //@item(fvFooVarCall, "fooVar", "func() int", "var")
|
2019-06-19 16:24:05 -06:00
|
|
|
|
|
|
|
type myFunc func() int
|
|
|
|
|
|
|
|
var fooType myFunc = fooVar //@item(fvFooType, "fooType", "myFunc", "var")
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
var _ = fooType() //@item(fvFooTypeCall, "fooType", "func() int", "var")
|
2019-06-19 16:24:05 -06:00
|
|
|
|
|
|
|
func _() {
|
|
|
|
var f func() int
|
|
|
|
f = foo //@complete(" //", fvFooFunc, fvFooType, fvFooVar)
|
|
|
|
|
|
|
|
var i int
|
|
|
|
i = foo //@complete(" //", fvFooFuncCall, fvFooTypeCall, fvFooVarCall)
|
|
|
|
}
|