mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inference: skip lambda content and all its dependants when lambda type parameter type is calculated
This commit is contained in:
+12
-12
@@ -20,6 +20,7 @@ import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.projectRoots.JavaSdkVersion;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.testFramework.IdeaTestUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
@@ -419,18 +420,17 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
|
||||
}
|
||||
}
|
||||
|
||||
assertTrue(tooltips.contains("<html><body><table border=0><tr><td>" +
|
||||
"<b>identity( ) </b></td><td colspan=1>in <b>Function</b> cannot be applied</td></tr><tr><td>to</td><td><b>()</b> " +
|
||||
|
||||
"</td></tr></table><br/>" +
|
||||
"reason: no instance(s) of type variable(s) K, U exist so that Map<K, U> conforms to Function<U, V>" +
|
||||
"</body></html>"));
|
||||
assertTrue(tooltips.contains(
|
||||
"<html><body><table border=0><tr><td>" +
|
||||
"<b>identity( ) </b></td><td colspan=1>in <b>Function</b> cannot be applied</td></tr><tr><td>to</td><td><b>()</b> " +
|
||||
"</td></tr></table><br/>" +
|
||||
"reason: no instance(s) of type variable(s) K, U exist so that Map<K, U> conforms to Function<U, V>" +
|
||||
"</body></html>"));
|
||||
boolean found = false;
|
||||
for (String tooltip : tooltips) {
|
||||
if (tooltip.contains("reason: no instance(s) of type variable(s) K, U exist so that Map<K, U> conforms to Function<U, V>")) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
fail(StringUtil.join(tooltips, ", "));
|
||||
}
|
||||
}
|
||||
|
||||
private void doTest() throws Exception {
|
||||
|
||||
+8
@@ -63,6 +63,14 @@ public class Java8ExpressionsCheckTest extends LightDaemonAnalyzerTestCase {
|
||||
doTestCachedUnresolved();
|
||||
}
|
||||
|
||||
public void testCacheUnresolvedMethods4() throws Exception {
|
||||
doTestCachedUnresolved();
|
||||
}
|
||||
|
||||
public void testCacheUnresolvedMethods5() throws Exception {
|
||||
doTestCachedUnresolved();
|
||||
}
|
||||
|
||||
public void testMethodOverloadsInsideLambdaHierarchy() throws Exception {
|
||||
doTestAllMethodCallExpressions();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user