overload resolution: clear inference errors from nested calls when top level expression is abadoned as non-applicable (IDEA-150718; IDEA-153222)

This commit is contained in:
Anna.Kozlova
2016-03-18 15:28:00 +01:00
parent cf20da777d
commit 034012ae4e
3 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import java.util.*;
class MyTest {
{
Set<Integer> set = new TreeSet<>(Comparator.comparing(b -> ""));
Set<Integer> set1 = new TreeSet<>(Comparator.comparing(b -> b != null ? "" : ""));
}
void f(List<String> l) {
setCategories(l.stream().toArray(size -> new String[size]));
setCategories(l.stream().toArray(String[]::new));
}
private void setCategories(String... strings) {}
}