void (@Nullable HighlightInfo.Builder info, @NotNull PsiExpression expression, @NotNull PsiType expectedType) { if (info == null) return; PsiElement parent = PsiUtil.skipParenthesizedExprUp(expression.getParent()); if (parent instanceof PsiReturnStatement) { PsiMethod method = PsiTreeUtil.getParentOfType(parent, PsiMethod.class, false, PsiLambdaExpression.class); if (method != null) { registerReturnTypeFixes(info, method, expectedType); } } else if (parent instanceof PsiLocalVariable) { HighlightFixUtil.registerChangeVariableTypeFixes((PsiLocalVariable)parent, expectedType, null, info); } else if (parent instanceof PsiAssignmentExpression) { HighlightFixUtil.registerChangeVariableTypeFixes(((PsiAssignmentExpression)parent).getLExpression(), expectedType, null, info); } }