mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
more informative error message (IDEA-125544)
This commit is contained in:
@@ -1229,11 +1229,6 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
myHolder.add(HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(expression)
|
||||
.descriptionAndTooltip(functionalInterfaceType.getPresentableText() + " is not a functional interface").create());
|
||||
}
|
||||
else if (LambdaUtil.dependsOnTypeParams(functionalInterfaceType, functionalInterfaceType, expression)) {
|
||||
HighlightInfo result1 =
|
||||
HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(expression).descriptionAndTooltip("Cyclic inference").create();
|
||||
myHolder.add(result1); //todo[ann] append not inferred type params info
|
||||
}
|
||||
}
|
||||
if (!myHolder.hasErrorResults()) {
|
||||
final PsiElement referenceNameElement = expression.getReferenceNameElement();
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
class Main {
|
||||
public void test() {
|
||||
Collections.sort(new ArrayList<>(), Comparator::<error descr="Cannot resolve method 'reversed'">reversed</error>);
|
||||
}
|
||||
}
|
||||
@@ -293,6 +293,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testUnresolvedMethodReference() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user