boolean (TerminalBlock tb) { PsiVariable variable = tb.getVariable(); final PsiExpression candidate = LambdaCanBeMethodReferenceInspection .canBeMethodReferenceProblem(tb.getSingleStatement(), new PsiVariable[]{variable}, createDefaultConsumerType(variable.getProject(), variable), null); if (!(candidate instanceof PsiCallExpression)) return true; final PsiMethod method = ((PsiCallExpression)candidate).resolveMethod(); return method == null; }