code: int makeRef(DiagnosticPosition pos, Type type) {
          checkDimension(pos, type);
          if (type.isAnnotated()) {
              return pool.put((Object)type);
          } else {
              return pool.put(type.hasTag(CLASS) ? (Object)type.tsym : (Object)type);
          }
      }
docs: Insert a reference to given type in the constant pool,
  checking for an array with too many dimensions;
  return the reference's index.
  @param type   The type for which a reference is inserted.