if (isKnowClassType(tp) && isLocalIdent(expr)) { Symbol sym = expr.symbol();
if (isKnowClassType(tp)) { Symbol val = currentOwner.newVariable(pos, Modifiers.SYNTHETIC, Names.LOCAL(currentOwner)); val.setType(expr.type);  Tree valDef = gen.ValDef(val, expr);
        private Tree genInstanceTest(int pos, Tree expr, Type tp) {            Tree tpVal = typeAsValue(pos, tp, currentOwner, EENV);            if (isKnowClassType(tp) && isLocalIdent(expr)) {                Symbol sym = expr.symbol();                Tree cheapTest =                    gen.mkIsInstanceOf(pos, gen.mkLocalRef(pos, sym), tp, true);                Symbol weakIsInst = defs.SCALACLASSTYPE_WEAKISINSTANCE();                Tree scalaTpVal = gen.mkAsInstanceOf(pos,                                                     tpVal,                                                     defs.SCALACLASSTYPE_TYPE(),                                                     true);                Tree expensiveTest =                    gen.mkApply_V(pos,                                  gen.Select(pos, scalaTpVal, weakIsInst),                                  new Tree[] { expr });                return gen.mkApply_V(pos,                                     gen.Select(pos,                                                cheapTest,                                                defs.BOOLEAN_AND()),                                     new Tree[] { expensiveTest });            } else {                Tree fun = gen.Select(pos, tpVal, defs.TYPE_ISINSTANCE());                return gen.mkApply_V(pos, fun, new Tree[] { expr });            }        }