-
Notifications
You must be signed in to change notification settings - Fork 405
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
Invalid code generation when interface method parameter's name is the same as interface name #648
Closed
1 of 5 tasks
Labels
Comments
So this should be trivially easy to fix. You already know a workaround, just name your argument differently. I believe we already have logic for checking for conflicting import names that I think we could use here. PRs welcome! |
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 25, 2023
…er's name is the same as interface name
21 tasks
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 25, 2023
…er's name is the same as interface name
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 25, 2023
…er's name is the same as interface name
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 25, 2023
…er's name is the same as interface name
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 27, 2023
kozmod
added a commit
to kozmod/mockery
that referenced
this issue
Jun 27, 2023
@LandonTClipp please close the issue by yourself) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When generating mocks for an interface with the method's arg is other interface and args name is the same as args type:
the generated code:
Error:
./mock_interfaceA_test.go:18:32: interfaceB (variable of type interfaceB) is not a type
Mockery Version
v2.30.1
Golang Version
1.20
Installation Method
Expected Behavior
It swirl be nice to generate different the mock's arg method name when declared type name is the same.
The text was updated successfully, but these errors were encountered: