mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
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:
+18
@@ -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) {}
|
||||
|
||||
}
|
||||
+4
@@ -406,6 +406,10 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPullingErrorMessagesFromSubExpressionsToTheTopLevel() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testVariableNamesOfNestedCalls() throws Exception {
|
||||
IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
|
||||
String filePath = BASE_PATH + "/" + getTestName(false) + ".java";
|
||||
|
||||
Reference in New Issue
Block a user