void (@NotNull PsiReturnStatement statement) { PsiExpression value = statement.getReturnValue(); if (value == null) return; PsiElement element = PsiTreeUtil.getParentOfType(statement, PsiMethod.class, PsiLambdaExpression.class); PsiMethod method = element instanceof PsiMethod ? (PsiMethod)element : LambdaUtil.getFunctionalInterfaceMethod(element); if (method == null) return; checkExpression(value, method, value.getType(), holder); }