boolean (PsiMethod suggested, PsiReferenceExpression expression) { if (!suggested.getParameterList().isEmpty()) return false; if (ExpressionUtils.isVoidContext(expression)) return true; PsiType expectedType = ExpectedTypeUtils.findExpectedType(expression, true); if (expectedType == null) return true; PsiType suggestedType = suggested.getReturnType(); return suggestedType != null && TypeConversionUtil.isAssignable(expectedType, suggestedType); }