mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
generics: do not prefer type with more bounds when additional bounds are just subtypes of the rest (IDEA-67668)
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<?>> void foo(S x);
|
||||
}
|
||||
|
||||
|
||||
class B
|
||||
{
|
||||
public static void main(String[] args) {
|
||||
A a = null;
|
||||
a.foo<error descr="Ambiguous method call: both 'A.foo(Collection<?>)' and 'A.foo(List<?>)' match">(null)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user