void (@NotNull PsiLambdaExpression expression) { if (!(PsiUtil.skipParenthesizedExprUp(expression.getParent()) instanceof PsiExpressionList)) { PsiMethod method = LambdaUtil.getFunctionalInterfaceMethod(expression); if (method != null) { PsiType returnType = method.getReturnType(); if (returnType != null) { List<PsiExpression> returns = LambdaUtil.getReturnExpressions(expression); for (PsiExpression aReturn : returns) { PsiExpression returnInLambda = deparenthesizeExpression(aReturn); if (returnInLambda instanceof PsiTypeCastExpression) { PsiExpression operand = getInnerMostOperand(returnInLambda); if (operand != null && returnType.equals(operand.getType())) { addToResults((PsiTypeCastExpression)returnInLambda); } } } } } } super.visitLambdaExpression(expression); }