We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
panic when GetMethod on interface{} with message: reflect: call of reflect.Value.Interface on zero Value
reflect: call of reflect.Value.Interface on zero Value
To Reproduce
run this test
type A interface { Foo() } type a struct { A } type b struct { i int } func (*b) Foo() { fmt.Println("abc") } func NewA() A { return &a{A: new(b)} } func TestXxx(t *testing.T) { mockey.PatchConvey("sample", t, func() { obj := NewA() mockey.Mock(mockey.GetMethod(obj, "Foo")).Build() }) }
Expected behavior
Not panic, mock successfully
Mockey version:
v1.2.0
The text was updated successfully, but these errors were encountered:
This is because getNestedMethod use reflect.Type not reflect.Value, which loss the interface{} field context. We will fix it soon
getNestedMethod
reflect.Type
reflect.Value
interface{}
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
panic when GetMethod on interface{} with message:
reflect: call of reflect.Value.Interface on zero Value
To Reproduce
run this test
Expected behavior
Not panic, mock successfully
Mockey version:
v1.2.0
The text was updated successfully, but these errors were encountered: