generics: do not prefer type with more bounds when additional bounds are just subtypes of the rest (IDEA-67668)

This commit is contained in:
anna
2013-04-30 18:12:19 +02:00
parent 5ce1daf06f
commit 504c2c3867
3 changed files with 61 additions and 20 deletions
@@ -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>;
}
}