mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
suggest SAM with same primitive return type (IDEA-174020)
This commit is contained in:
@@ -112,12 +112,12 @@ public class FunctionalInterfaceSuggester {
|
||||
}
|
||||
|
||||
final PsiType returnType = method.getReturnType();
|
||||
PsiType interfaceMethodReturnType = interfaceMethod.getReturnType();
|
||||
if (returnType != null && !TypeConversionUtil.isAssignable(returnType, substitutor.substitute(interfaceMethodReturnType))) {
|
||||
PsiType interfaceMethodReturnType = substitutor.substitute(interfaceMethod.getReturnType());
|
||||
if (returnType != null && !TypeConversionUtil.isAssignable(returnType, interfaceMethodReturnType)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (PsiType.VOID.equals(returnType) && !PsiType.VOID.equals(interfaceMethodReturnType)) {
|
||||
|
||||
if (returnType instanceof PsiPrimitiveType && !returnType.equals(interfaceMethodReturnType)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user