docs: public static Type getUpperBound(Type type, Types types) {
      if (type.hasTag(TypeTag.WILDCARD)) {
        return types.wildUpperBound(type);
      }
  
      if (type.hasTag(TypeTag.TYPEVAR) && ((TypeVar) type).isCaptured()) {
        return types.cvarUpperBound(type);
      }
  
      if (type.getUpperBound() != null) {
        return type.getUpperBound();
      }
  
      // concrete type, e.g. java.lang.String, or a case we haven't considered
      return type;
    }