Using any
keyword together with nil
causes panic in generated code
#820
Labels
any
keyword together with nil
causes panic in generated code
#820
Description
Using
any
keyword and returning nil does not generate the same code as forinterface{}
, causing a nil interface panicMockery Version
2.46.1 - does NOT reproduce with previous versions
Go Version
1.23.1
Installation Method
Steps to Reproduce
any
nil
Expected Behavior
Code doesn't panic
Actual Behavior
Code panics.
Upon inspecting the generated code, I've noticed that the two mocked methods differ in how they handle the return:
The text was updated successfully, but these errors were encountered: