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

Match JavaType.GenericTypeVariable in TypeUtils#isAssignableTo() #3655

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

knutwannheden
Copy link
Contributor

Fix the assignability test for generic type variable types.

Fix the assignability test for generic type variable types.
@knutwannheden knutwannheden merged commit 30a74ee into main Nov 2, 2023
1 check passed
@knutwannheden knutwannheden deleted the assignable-generic-type-variable branch November 2, 2023 13:41
@knutwannheden knutwannheden added the enhancement New feature or request label Nov 2, 2023
@knutwannheden knutwannheden self-assigned this Nov 2, 2023
knutwannheden added a commit to openrewrite/rewrite-static-analysis that referenced this pull request Nov 2, 2023
The `RemoveRedundantTypeCast` recipe will now also remove casts when the types involve generics. Further, when the type cast is the expression of a `return` statement, then the target type will be derived from the corresponding method declaration if any (lambdas are not supported here yet).

Note: This implementation relies on openrewrite/rewrite#3655.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant