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
public class Test {
public static <T> List<T> getInParameter(T value, Class<T> type) {
return new ArrayList<>(5);
}
List<?> getInParameter() {
var value = 5;
var type = Integer.class;
var result = getInParameter(value, type);
return result;
}
}
results in
C:\Projects\pvyscomponents\java\libs\kernel\repository\api\src\main\java\com\provys\repository\Test.java
java: [type.argument] incompatible type argument for type parameter E of List.
found : @UnknownInitialization @NonNull Integer
required: @Initialized @Nullable Object
C:\Projects\pvyscomponents\java\libs\kernel\repository\api\src\main\java\com\provys\repository\Test.java:16:32
java: [assignment] incompatible types in assignment.
found : @Initialized @NonNull List<@Initialized @NonNull Integer>
required: @UnknownInitialization @Nullable List<@UnknownInitialization @NonNull Integer>
It should compile without problem.
It compiled in 3.42.0, fails in 3.46.0
If explicit type is specified for target List<Integer> result = getInParameter(value, type);
it compiles without problem
The text was updated successfully, but these errors were encountered:
Might be related to issue #6675
results in
It should compile without problem.
It compiled in 3.42.0, fails in 3.46.0
If explicit type is specified for target
List<Integer> result = getInParameter(value, type);
it compiles without problem
The text was updated successfully, but these errors were encountered: