public RegisterSpec withType(TypeBearer newType) {
    return makeLocalOptional(reg, newType, local);
  }
Returns an instance that is identical to this one, except that the type is replaced by the
given one.

@param newType {@code non-null;} the new type
@return {@code non-null;} an appropriately-constructed instance
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/RegisterSpec.java