void (@NotNull PsiConditionalExpression expr) { if (myExpr.equals(expr.getCondition())) { if (myForCompletion) { myExpr = expr; myExpr.getParent().accept(this); return; } myResult.add(createInfoImpl(PsiTypes.booleanType(), ExpectedTypeInfo.TYPE_STRICTLY, PsiTypes.booleanType(), TailTypes.noneType())); } else if (myExpr.equals(expr.getThenExpression())) { ExpectedTypeInfo[] types = getExpectedTypes(expr, myForCompletion, ourGlobalScopeClassProvider, false, false, myMaxCandidates); for (int i = 0; i < types.length; i++) { final ExpectedTypeInfo info = types[i]; types[i] = createInfoImpl(info.getType(), info.getKind(), info.getDefaultType(), TailTypes.conditionalExpressionColonType(), info.getCalledMethod(), ((ExpectedTypeInfoImpl)info)::getExpectedName); } Collections.addAll(myResult, types); } else { if (!myExpr.equals(expr.getElseExpression())) { LOG.error(Arrays.asList(expr.getChildren()) + "; " + myExpr); } Collections.addAll(myResult, getExpectedTypes(expr, myForCompletion, ourGlobalScopeClassProvider, false, false, myMaxCandidates)); } }