mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
erasure of method call expression type if method is not generics but unchecked conversion was needed to check the applicability (IDEA-157223)
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
public static <Om> List<Om> sort(Comparator comp, Stream<Om> stream) {
|
||||
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.util.List<Om>'">return stream.sorted(comp).collect(Collectors.toList());</error>
|
||||
}
|
||||
|
||||
//accept unbounded wildcards
|
||||
List<String> get(List<?> lists) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void foo(List l) {
|
||||
String p = get(l).get(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user