void (@NotNull PsiArrayInitializerExpression expression) { PsiExpression[] initializers = expression.getInitializers(); Evaluator[] evaluators = new Evaluator[initializers.length]; final PsiType type = expression.getType(); boolean primitive = type instanceof PsiArrayType && ((PsiArrayType)type).getComponentType() instanceof PsiPrimitiveType; for (int idx = 0; idx < initializers.length; idx++) { PsiExpression initializer = initializers[idx]; initializer.accept(this); if (myResult != null) { final Evaluator coerced = primitive ? handleUnaryNumericPromotion(initializer.getType(), myResult) : new BoxingEvaluator(myResult); evaluators[idx] = DisableGC.create(coerced); } else { throw expressionInvalid(initializer); } } myResult = new ArrayInitializerEvaluator(evaluators); if (type != null && !(expression.getParent() instanceof PsiNewExpression)) { myResult = new NewArrayInstanceEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)), null, myResult); } }