mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
new inference: incomplete methods ready
(cherry picked from commit 59177525941b8cb78cb8f99d7402e9528c8894ad)
This commit is contained in:
@@ -78,7 +78,6 @@ public class CheckedExceptionCompatibilityConstraint extends InputOutputConstrai
|
||||
if (!session.isProperType(substitutor.substitute(parameter.getType()))) return false;
|
||||
}
|
||||
final PsiType returnType = interfaceMethod.getReturnType();
|
||||
LOG.assertTrue(returnType != null, interfaceMethod);
|
||||
if (!session.isProperType(substitutor.substitute(returnType))) return false;
|
||||
|
||||
final List<PsiType>
|
||||
|
||||
@@ -54,7 +54,6 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
|
||||
final PsiSubstitutor substitutor = LambdaUtil.getSubstitutor(interfaceMethod, classResolveResult);
|
||||
final PsiParameter[] targetParameters = interfaceMethod.getParameterList().getParameters();
|
||||
final PsiType returnType = substitutor.substitute(interfaceMethod.getReturnType());
|
||||
LOG.assertTrue(returnType != null, interfaceMethod);
|
||||
final PsiType[] typeParameters = myExpression.getTypeParameters();
|
||||
if (!myExpression.isExact()) {
|
||||
for (PsiParameter parameter : targetParameters) {
|
||||
@@ -105,7 +104,7 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (returnType != PsiType.VOID) {
|
||||
if (returnType != PsiType.VOID && returnType != null) {
|
||||
if (applicableMethodReturnType == PsiType.VOID) {
|
||||
return false;
|
||||
}
|
||||
@@ -126,7 +125,7 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
|
||||
return false;
|
||||
}
|
||||
|
||||
if (PsiType.VOID.equals(returnType)) {
|
||||
if (PsiType.VOID.equals(returnType) || returnType == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user