protected void enterTypevars(Type t) {
        if (t.getEnclosingType() != null && t.getEnclosingType().tag == CLASS)
            enterTypevars(t.getEnclosingType());
        for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail)
            typevars.enter(xs.head.tsym);
    }