@Override
    public void visitVariable(@NotNull PsiVariable variable) {
      super.visitVariable(variable);
      if (ignoreVariables || variable instanceof PsiRecordComponent) {
        // C-style array declaration in records are not accepted -- see https://bugs.openjdk.org/browse/JDK-8250629
        return;
      }
      if (variable.isUnnamed()) {
        // C-style array declaration in unnamed variables are not accepted
        return;
      }
      if (variable instanceof PsiParameter parameter && parameter.isVarArgs()) {
        // not compilable, fix is handled by error highlighting
        return;
      }
      final PsiTypeElement typeElement = variable.getTypeElement();
      if (typeElement == null || typeElement.isInferredType()) {
        return; // true for enum constants or lambda parameters
      }
      final PsiType declaredType = variable.getType();
      if (declaredType.getArrayDimensions() == 0) {
        return;
      }
      final PsiType elementType = typeElement.getType();
      if (elementType.equals(declaredType)) {
        return;
      }
      if (isVisibleHighlight(variable)) {
        highlightBrackets(variable, variable.getNameIdentifier());
      }
      else {
        registerError(variable, variable);
      }
    }
@Override
    public void visitVariable(@NotNull PsiVariable variable)