code: public List<Type> closure(Type t) {
          List<Type> cl = closureCache.get(t);
          if (cl == null) {
              Type st = supertype(t);
              if (!t.isCompound()) {
                  if (st.hasTag(CLASS)) {
                      cl = insert(closure(st), t);
                  } else if (st.hasTag(TYPEVAR)) {
                      cl = closure(st).prepend(t);
                  } else {
                      cl = List.of(t);
                  }
              } else {
                  cl = closure(supertype(t));
              }
              for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail)
                  cl = union(cl, closure(l.head));
              closureCache.put(t, cl);
          }
          return cl;
      }
docs: Returns the closure of a class or interface type.