gen.Select( gen.mkRef(clazz.pos, Type.localThisType, equalsParam), defs.ANY_IS),
gen.Select(gen.mkLocalRef(clazz.pos, equalsParam), defs.ANY_IS),
    private Tree equalsMethod(ClassSymbol clazz) {	Symbol equalsSym = new TermSymbol(clazz.pos, Names.equals, clazz, OVERRIDE);	Symbol equalsParam = 	    new TermSymbol(clazz.pos, Names.that, equalsSym, PARAM)	    .setInfo(defs.ANY_TYPE());	equalsSym.setInfo(	    Type.MethodType(new Symbol[]{equalsParam}, defs.BOOLEAN_TYPE()));	clazz.info().members().enter(equalsSym);	Tree[] fields = caseFields(clazz);	Type testtp = clazz.type();	{	    Symbol[] tparams = clazz.typeParams();	    if (tparams.length != 0) {		Type[] targs = new Type[tparams.length];		for (int i = 0; i < targs.length; i++) 		    targs[i] = defs.ANY_TYPE();		testtp = testtp.subst(tparams, targs);	    }	}	// if (that is C) {...	Tree cond = gen.TypeApply(	    gen.Select(		gen.mkRef(clazz.pos, Type.localThisType, equalsParam), 		defs.ANY_IS),	    new Tree[]{gen.mkType(clazz.pos, testtp)});	Tree thenpart;	if (fields.length == 0) {	    thenpart = gen.mkBooleanLit(clazz.pos, true);	} else {	    // val that1 = that as C;	    Tree cast = gen.TypeApply(		gen.Select(		    gen.mkRef(clazz.pos, Type.localThisType, equalsParam), 		    defs.ANY_AS),		new Tree[]{gen.mkType(clazz.pos, testtp)});	    Symbol that1sym = new TermSymbol(clazz.pos, Names.that1, equalsSym, 0)		.setType(testtp);	    Tree that1def = gen.ValDef(that1sym, cast);	    	    // this.elem_1 == that1.elem_1 && ... && this.elem_n == that1.elem_n	    Tree cmp = eqOp(		fields[0], 		qualCaseField(clazz,		    gen.mkRef(clazz.pos, Type.localThisType, that1sym), 0));	    for (int i = 1; i < fields.length; i++) {		cmp = gen.Apply(		    gen.Select(cmp, defs.BOOLEAN_AND()),		    new Tree[]{			eqOp(			    fields[i], 			    qualCaseField(clazz,				gen.mkRef(clazz.pos, Type.localThisType, that1sym), i))});	    }	    thenpart = gen.Block(new Tree[]{that1def, cmp});	}	Tree body = gen.If(cond, thenpart, gen.mkBooleanLit(clazz.pos, false));	return gen.DefDef(equalsSym, body);    }