mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
lvti: don't resolve method calls to detect self-referenced (IDEA-194104)
This commit is contained in:
@@ -198,6 +198,9 @@ public class PsiTypeElementImpl extends CompositePsiElement implements PsiTypeEl
|
||||
@Override
|
||||
public void visitReferenceExpression(PsiReferenceExpression expression) {
|
||||
super.visitReferenceExpression(expression);
|
||||
if (expression.getParent() instanceof PsiMethodCallExpression) {
|
||||
return;
|
||||
}
|
||||
if (expression.resolve() == parent) {
|
||||
referenced = true;
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class MyTest {
|
||||
|
||||
private void getMethods(final Stream<Method> stream) {
|
||||
final var collector = Collectors.toMap(null, c -> {
|
||||
System.out.println(c);
|
||||
return new LinkedHashMap<String, Integer>();
|
||||
}, (v1, v2) -> v2, null);
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -48,6 +48,8 @@ public class LightAdvLVTIHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
public void testUpwardProjection() { doTest(); }
|
||||
|
||||
public void testFailedInferenceWithLeftTypeVar() { doTest(); }
|
||||
|
||||
public void testVarInLambdaParameters() {
|
||||
setLanguageLevel(LanguageLevel.JDK_11);
|
||||
doTest();
|
||||
|
||||
Reference in New Issue
Block a user