Fixes #74377
Change-Id: I250d67ef2a4bf4dac939be669eeaf1091523ac06
Reviewed-on: https://go-review.googlesource.com/c/go/+/690617
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
// type of the function's corresponding input parameter.
// If v is a variadic function, Call creates the variadic slice parameter
// itself, copying in the corresponding values.
+// It panics if the Value was obtained by accessing unexported struct fields.
func (v Value) Call(in []Value) []Value {
v.mustBe(Func)
v.mustBeExported()
// It returns the output results as Values.
// As in Go, each input argument must be assignable to the
// type of the function's corresponding input parameter.
+// It panics if the Value was obtained by accessing unexported struct fields.
func (v Value) CallSlice(in []Value) []Value {
v.mustBe(Func)
v.mustBeExported()