-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Moq ignores package names of arguments of generic types #177
Comments
Hmm, yeah I guess it's not 'generics ready'. I wonder if you fancy submitting a failing test in a PR? |
Hey, I actually ran into the same issue. Was just curious if there was any movement on this? |
i read the changelog of 0.3.0 that said it got generics support. tested it today. still running into this problem. |
xsteadfastx
added a commit
to xsteadfastx/moq
that referenced
this issue
Jan 26, 2023
i created a failing test through #177 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When mocking a method with a generic type, moq ignores package names of type arguments.
This works:
But this does not:
The generated code instantiates
Bar
asBar[Type]
instead ofBar[pkg.Type]
, failing to compile:I've tried workarounds like dot imports and type aliases, but got the same results. If
Bar
type is a built-in likemap
, it works fine.moq version
v0.2.7
.The text was updated successfully, but these errors were encountered: