-
Notifications
You must be signed in to change notification settings - Fork 36
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
Signature of anything()
#27
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I use
anything()
in my tests, the compiler sometimes is not able to infer the type of the matcher (e.g. when I use generic convenience methods that will have to pull out objects of an[Any]
before checking the type and then applying the matcher).This will lead to error messages like
where
W
corresponds to the generic type of a matcher.Shouldn't it be okay for
anything()
to returnMatcher<Any>
instead ofMatcher<T>
. The generic typeT
doesn't seem to be used anywhere and I wouldn't have to tell the compiler what to do by addingas Matcher<Any>
to my code.The text was updated successfully, but these errors were encountered: