mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
reverted java highlighting: give up check of @PolymorphicSignature methods (IDEA-251449)
appeared to be a javac bug GitOrigin-RevId: 1d17221830606f5bdc8d0db78fa97f94e9548799
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c8fe5a1584
commit
9355c487e2
@@ -1,7 +1,6 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil;
|
||||
import com.intellij.core.JavaPsiBundle;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
@@ -163,12 +162,6 @@ public final class PsiMethodReferenceUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
PsiElement element = result.getElement();
|
||||
if (element instanceof PsiMethod &&
|
||||
AnnotationUtil.isAnnotated(((PsiMethod)element), CommonClassNames.JAVA_LANG_INVOKE_MH_POLYMORPHIC, 0)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (TypeConversionUtil.isAssignable(interfaceReturnType, methodReturnType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java.lang.invoke.MethodHandle;
|
||||
|
||||
class MyTest {
|
||||
private void m(MethodHandle handle) {
|
||||
I stringSupplier = handle::invokeExact;
|
||||
I stringSupplier = <error descr="Bad return type in method reference: cannot convert java.lang.Object to java.lang.String">handle::invokeExact</error>;
|
||||
}
|
||||
}
|
||||
interface I {
|
||||
|
||||
Reference in New Issue
Block a user