Tree.Apply(Tree.TypeApply(Tree.Select(qualifier, Names.as), new Tree[] { gen.mkType(qualifier.pos, ownerTp) }), Tree.EMPTY_ARRAY);
gen.Apply(gen.TypeApply(gen.Select(qualifier, defs.AS), new Tree[] { gen.mkType(qualifier.pos, ownerTp) }), Tree.EMPTY_ARRAY);
    public Tree transform(Tree tree) {        switch (tree) {        case ClassDef(int mods,                      Name name,                      TypeDef[] tparams,                      ValDef[][] vparams,                      Tree tpe,                      Template impl):            if (Modifiers.Helper.isInterface(mods))                return super.transform(tree);            else {                global.log("expanding " + name);		Tree.ClassDef newClass = (Tree.ClassDef)                    copy.ClassDef(tree,                                  mods,                                  name,                                  super.transform(tparams),                                  super.transform(vparams),                                  super.transform(tpe),                                  getMixinExpandedTemplate(impl, tree.symbol()));		newClass.symbol().setInfo(newClass.impl.type);		return newClass;	    }        default:            Tree newTree = super.transform(tree);            switch (newTree) {            case Apply(Select(Tree qualifier, Name selector), Tree[] args): {                Tree fun = ((Tree.Apply)newTree).fun;                Symbol funOwnerSym = fun.symbol().owner();                Symbol qualSym = qualifier.type.symbol();                if (! (qualifier instanceof Tree.Super                       || qualSym.isSubClass(funOwnerSym))) {                    Type ownerTp = funOwnerSym.type();                    Tree castQualifier =                        Tree.Apply(Tree.TypeApply(Tree.Select(qualifier, Names.as),                                                  new Tree[] {                                                      gen.mkType(qualifier.pos, ownerTp)                                                  }),                                   Tree.EMPTY_ARRAY);                    return copy.Apply(newTree,                                      copy.Select(fun, castQualifier, selector),                                      args);                } else                    return newTree;            }            default:                return newTree;            }        }    }