You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List<?> is not the same as List , this will result in a compilation error like this:
error: incompatible types: List<CAP#1> cannot be converted to List<String>
test(list));
^
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
Thanks for the detailed report once again @nazoking ! Indeed an issue with how we handle generics. Would you be willing to turn the above into a runnable unit test and start a draft PR as a step up to a fix?
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Gradle plugin, and my project is a multi module project.
and run
What is the smallest, simplest way to reproduce the problem?
A code snippet can be something simple like this.
What did you expect to see?
What did you see instead?
List<?>
is not the same asList
, this will result in a compilation error like this:Are you interested in contributing a fix to OpenRewrite?
Indicate if this is something you would like to work on, and how we can best support you in doing so.
The text was updated successfully, but these errors were encountered: