new inference: initial tests

This commit is contained in:
Anna Kozlova
2013-09-20 12:11:57 +04:00
parent 970a180902
commit 935cdbaf3b
229 changed files with 7713 additions and 1 deletions
@@ -0,0 +1,11 @@
import java.util.*;
abstract class A {
static <T> void foo(List<T> x) { }
static <T extends List<?>> void foo(Collection<T> x) { }
public static void main(String[] args){
List<List<String>> x = null;
foo<error descr="Ambiguous method call: both 'A.foo(List<List<String>>)' and 'A.foo(Collection<List<String>>)' match">(x)</error>;
foo<error descr="Ambiguous method call: both 'A.foo(List<Object>)' and 'A.foo(Collection<List<?>>)' match">(null)</error>;
}
}