more specific inference: do not compare functional types if both methods were generic

This commit is contained in:
Anna Kozlova
2014-02-20 22:32:39 +01:00
parent e42ff74cc5
commit d2c3b4baef
3 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import java.util.Collection;
import java.util.HashSet;
class A {
Collection<String> thrownInTryStatement = null;
final Collection<String> thrownTypes = ContainerUtil.newHashSet( thrownInTryStatement);
}
class ContainerUtil extends ContainerUtilRt{
public static <T> HashSet<T> newHashSet(Iterable<? extends T> iterable) {
return null;
}
}
class ContainerUtilRt {
public static <T> HashSet<T> newHashSet(Iterable<? extends T> iterable) {
return null;
}
}