mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
generics: do not prefer type with more bounds when additional bounds are just subtypes of the rest, discard unchecked conversion (IDEA-67669)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
interface A
|
||||
{
|
||||
<S extends Collection<?> & List<?>> void foo(S x);
|
||||
<S extends List> String foo(S x);
|
||||
}
|
||||
|
||||
|
||||
class B
|
||||
{
|
||||
public static void main(String[] args) {
|
||||
A a = null;
|
||||
char c = a.foo(null).<error descr="Cannot resolve method 'charAt(int)'">charAt</error>(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user