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

AsInstanceOf: false negatives with shorthand anonymous functions #577

Open
nigredo-tori opened this issue Feb 17, 2022 · 1 comment
Open
Labels

Comments

@nigredo-tori
Copy link
Contributor

This does not trigger AsInstanceOf (it should):

val f: String => Int = _.asInstanceOf[Int]

This does:

val f: String => Int = s => s.asInstanceOf[Int]

Tested with Wartremover 2.4.17 and Scala 2.13.8.

@nigredo-tori
Copy link
Contributor Author

Looks a lot like this. See the fix in #333.

@xuwei-k xuwei-k added the bug label May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants