code: protected void enterTypevars(Symbol sym, Type t) {
          if (t.getEnclosingType() != null) {
              if (!t.getEnclosingType().hasTag(TypeTag.NONE)) {
                  enterTypevars(sym.owner, t.getEnclosingType());
              }
          } else if (sym.kind == MTH && !sym.isStatic()) {
              enterTypevars(sym.owner, sym.owner.type);
          }
          for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail) {
              typevars.enter(xs.head.tsym);
          }
      }
docs: Enter type variables of this classtype and all enclosing ones in
  `typevars'.