code: @SuppressWarnings("AmbiguousMethodReference")
    static JSType getLeastSupertype(JSType thisType, JSType thatType) {
      boolean areEquivalent = thisType.isEquivalentTo(thatType);
      return areEquivalent ? thisType :
          filterNoResolvedType(
              thisType.registry.createUnionType(thisType, thatType));
    }
docs: A generic implementation meant to be used as a helper for common getLeastSupertype
  implementations.