mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
method refs: ensure non-resolved method refs are not marked as exact (EA-59172 - assert: TypeConversionUtil.reportHierarchyInconsistency)
This commit is contained in:
+4
@@ -151,6 +151,10 @@ public class PsiMethodReferenceExpressionImpl extends PsiReferenceExpressionBase
|
||||
result.add(signature.getMethod());
|
||||
}
|
||||
}
|
||||
|
||||
if (result.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
methods = result.toArray(new PsiMethod[result.size()]);
|
||||
}
|
||||
else if (isConstructor()) {
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
class Test<A> {
|
||||
class P {
|
||||
{
|
||||
g(P::<error descr="Cannot resolve method 'aa'">aa</error>);
|
||||
}
|
||||
}
|
||||
<R> void g(Function<R, String> r){}
|
||||
}
|
||||
+4
@@ -386,6 +386,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testEnsureNotResolvedMethodRefsAreNotMarkedAsExact() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user