code: void checkCompatibleUpperBounds(UndetVar uv, InferenceContext inferenceContext) {
          List<Type> hibounds =
                  Type.filter(uv.getBounds(InferenceBound.UPPER), new BoundFilter(inferenceContext));
          Type hb = null;
          if (hibounds.isEmpty())
              hb = syms.objectType;
          else if (hibounds.tail.isEmpty())
              hb = hibounds.head;
          else
              hb = types.glb(hibounds);
          if (hb == null || hb.isErroneous())
              reportBoundError(uv, BoundErrorKind.BAD_UPPER);
      }
docs: Make sure that the upper bounds we got so far lead to a solvable inference
  variable by making sure that a glb exists.