mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
method type: ensure erased when type arguments are provided
This commit is contained in:
+1
-2
@@ -21,7 +21,6 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.projectRoots.JavaSdkVersion;
|
||||
import com.intellij.openapi.projectRoots.JavaVersionService;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.DebugUtil;
|
||||
@@ -250,7 +249,7 @@ public class PsiMethodCallExpressionImpl extends ExpressionPsiElement implements
|
||||
// If unchecked conversion was necessary for the method to be applicable,
|
||||
// the parameter types of the invocation type are the parameter types of the method's type,
|
||||
// and the return type and thrown types are given by the erasures of the return type and thrown types of the method's type.
|
||||
if ((!languageLevel.isAtLeast(LanguageLevel.JDK_1_8) && method.hasTypeParameters() ||
|
||||
if (((!languageLevel.isAtLeast(LanguageLevel.JDK_1_8) || call.getTypeArguments().length > 0) && method.hasTypeParameters() ||
|
||||
!method.hasTypeParameters() && JavaVersionService.getInstance().isAtLeast(call, JavaSdkVersion.JDK_1_8)) &&
|
||||
result instanceof MethodCandidateInfo && ((MethodCandidateInfo)result).isApplicable()) {
|
||||
final PsiType[] args = call.getArgumentList().getExpressionTypes();
|
||||
|
||||
Reference in New Issue
Block a user