Skip to content
New issue

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

Fix bug when last argument is a function with multiple return values #774

Merged
merged 2 commits into from
Apr 20, 2024

Commits on Apr 20, 2024

  1. Fix bug when last argument is a function with multiple return values

    There are two bugs fixed in this commit:
    
    1. As noted in issue vektra#766, mockery failed to generate a mock because it incorrectly considered the return values themselves to be variadic, which is impossible. The fix is to always consider return tuples non-variadic.
    2. The `.EXPECT()` struct had an incorrect signature when the argument was a variadic function. The reason was because it triggered off the presence of `"..."` in the type string instead of triggering off the variadic-ness of the outer function. The fix was to simply use the `variadic` flag to determine if the last argument should be variadic.
    LandonTClipp committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    9b4107f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a382dd5 View commit details
    Browse the repository at this point in the history