public void enterIfAbsent(Symbol sym) {
        assert shared == 0;
        Entry e = lookup(sym.name);
        while (e.scope == this && e.sym.kind != sym.kind) e = e.next();
        if (e.scope != this) enter(sym);
    }