void (@NotNull PsiNewExpression patternExpression, @NotNull PsiNewExpression matchExpression) { final PsiType type1 = patternExpression.getType(); final PsiType type2 = matchExpression.getType(); if (!myMatchingVisitor.setResult(type1 != null && type2 != null && type1.getArrayDimensions() == type2.getArrayDimensions())) return; final PsiArrayInitializerExpression initializer1 = patternExpression.getArrayInitializer(); final PsiArrayInitializerExpression initializer2 = matchExpression.getArrayInitializer(); if (initializer1 != null) { if (!myMatchingVisitor.setResult(myMatchingVisitor.matchSons(initializer1, initializer2))) return; } else if (initializer2 != null) { myMatchingVisitor.setResult(areZeroLiterals(patternExpression.getArrayDimensions()) && initializer2.getInitializers().length == 0); return; } final PsiExpression[] dimensions1 = patternExpression.getArrayDimensions(); final PsiExpression[] dimensions2 = matchExpression.getArrayDimensions(); if (!myMatchingVisitor.setResult(dimensions1.length == dimensions2.length)) return; if (dimensions1.length != 0) { for (int i = 0; i < dimensions1.length; ++i) { if (!myMatchingVisitor.setResult(myMatchingVisitor.match(dimensions1[i], dimensions2[i]))) return; } } else { myMatchingVisitor.setResult(myMatchingVisitor.matchSons(patternExpression.getArgumentList(), matchExpression.getArgumentList()) && myMatchingVisitor.setResult(matchTypeParameters(patternExpression, matchExpression))); } }