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

Avoid dead code warning in any macro for value classes #111

Merged
merged 1 commit into from
May 19, 2019

Conversation

perok
Copy link
Contributor

@perok perok commented May 18, 2019

Value classes will give dead code warning on ArgumentMatchers.any because nothing is inferred. Adding type annotation for the inner type of the value class fixes that issue.

This is my first time testing out macros for Scala so I'm not sure if there are better ways or problematic edge cases. Open for suggestions :)

Value classes will give dead code warning on `ArgumentMatchers.any`
because type annotation is missing. This commit fetches the internal type of the
value class and adds the annotation.
@ultrasecreth ultrasecreth merged commit 9815742 into mockito:release/1.x May 19, 2019
@ultrasecreth
Copy link
Member

Looks cool, thanks!

@perok perok deleted the warnDeadCode branch May 20, 2019 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants