void (@NotNull HighlightInfo.Builder highlightInfo, @Nullable PsiExpression expression, @NotNull PsiType lType) { if (lType != PsiTypes.nullType() && expression instanceof PsiConditionalExpression) { final PsiExpression thenExpression = ((PsiConditionalExpression)expression).getThenExpression(); final PsiExpression elseExpression = ((PsiConditionalExpression)expression).getElseExpression(); if (thenExpression != null && elseExpression != null) { final PsiType thenType = thenExpression.getType(); final PsiType elseType = elseExpression.getType(); if (thenType != null && elseType != null) { final boolean thenAssignable = TypeConversionUtil.isAssignable(lType, thenType); final boolean elseAssignable = TypeConversionUtil.isAssignable(lType, elseType); if (!thenAssignable && thenExpression instanceof PsiMethodCallExpression) { inferTypeArgs(highlightInfo, lType, thenExpression); } if (!elseAssignable && elseExpression instanceof PsiMethodCallExpression) { inferTypeArgs(highlightInfo, lType, elseExpression); } } } } }