public TypeBinding resolveType(BlockScope scope) {
    // Build an array type reference using the current dimensions
    // The parser does not check for the fact that dimension may be null
    // only at the -end- like new int [4][][]. The parser allows new int[][4][]
    // so this must be checked here......(this comes from a reduction to LL1 grammar)

    TypeBinding referenceType = this.type.resolveType(scope, true /* check bounds*/);

    // will check for null after dimensions are checked
    this.constant = Constant.NotAConstant;

    // check the validity of the dimension syntax (and test for all null dimensions)
    int explicitDimIndex = -1;
    loop:
    for (int i = this.dimensions.length; --i >= 0; ) {
      if (this.dimensions[i] != null) {
        if (explicitDimIndex < 0) explicitDimIndex = i;
      } else if (explicitDimIndex > 0) {
        break loop;
      }
    }

    // dimensions resolution
    for (int i = 0; i <= explicitDimIndex; i++) {
      Expression dimExpression;
      if ((dimExpression = this.dimensions[i]) != null) {
        TypeBinding dimensionType = dimExpression.resolveTypeExpecting(scope, TypeBinding.INT);
      }
    }

    // building the array binding
    if (referenceType != null) {
      this.resolvedType = scope.createArrayType(referenceType, this.dimensions.length);

      // check the initializer
      if (this.initializer != null) {
        if ((this.initializer.resolveTypeExpecting(scope, this.resolvedType)) != null)
          this.initializer.binding = (ArrayBinding) this.resolvedType;
      }
    }
    return this.resolvedType;
  }