You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[This may be a duplicate of issue #770]
package main
import (
"reflect"
"fmt"
)
type X int
func (_ X) Foo() { }
func main() {
v := reflect.NewValue(X(0))
fmt.Printf("%d\n", v.Type().Method(0).Type.NumIn())
fmt.Printf("%d\n", v.Method(0).Type().(*reflect.FuncType).NumIn())
v.Method(0).Call([]reflect.Value{reflect.NewValue(X(0))})
}
this prints:
1
1
panic: FuncValue: wrong argument count
The type of the method should return the argument count
that the method is expected to be called with.
6g darwin 6d3022dfb42b+ tip
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: