new inference: restore cache after use

This commit is contained in:
Anna Kozlova
2014-08-06 12:28:03 +02:00
parent b878d04288
commit 5f361c8614
3 changed files with 31 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
import java.util.List;
import java.util.Set;
abstract class Overloadsss {
abstract <T> List<T> foo(List<T> l);
abstract <T> Set<T> foo(Set<T> s);
abstract <K> List<K> bar(List<K> l);
abstract <K> List<K> bar1(List<K> l);
abstract <K> Set<K> bar1(Set<K> s);
{
List<String> l = foo(bar (null));
List<String> l1 = foo(bar1<error descr="Ambiguous method call: both 'Overloadsss.bar1(List<Object>)' and 'Overloadsss.bar1(Set<Object>)' match">(null)</error>);
}
}