@Override
    public void visitArrayInitializerExpression(@NotNull PsiArrayInitializerExpression expression) {
      super.visitArrayInitializerExpression(expression);
      final PsiElement parent = expression.getParent();
      if (!(parent instanceof PsiNewExpression)) {
        return;
      }
      final PsiElement grandParent = PsiUtil.skipParenthesizedExprUp(parent.getParent());
      if (!(grandParent instanceof PsiVariable variable)) {
        return;
      }
      final PsiType expressionType = expression.getType();
      if (!variable.getType().equals(expressionType)) {
        return;
      }
      final PsiTypeElement typeElement = variable.getTypeElement();
      if (typeElement != null && typeElement.isInferredType()) {
        return;
      }
      if (hasGenericTypeParameters(variable)) {
        return;
      }
      registerErrorAtOffset(parent, 0, expression.getStartOffsetInParent(),
                            expressionType.getPresentableText());
    }
@Override
    public void visitArrayInitializerExpression(@NotNull PsiArrayInitializerExpression expression)