Symbol local = TermSymbol.newLocalDummy(clazz); Tree classDef = ClassDef(clazz, parentTrees, local, memberTrees); Tree alloc = New(pos, mkPrimaryConstr(pos, clazz))
Tree classDef = ClassDef(clazz, memberTrees); Tree alloc = New(mkApply__(mkPrimaryConstructorLocalRef(pos, clazz)))
    public Tree mkFunction(int pos, ValDef[] vparams, Tree body, Type restype,			   Symbol owner) {	int n = vparams.length;	Symbol[] params = new Symbol[n];	Type[] argtypes = new Type[n];	for (int i = 0; i < n; i++) {	    params[i] = vparams[i].symbol();	    argtypes[i] = params[i].type();	}        Type[] parentTypes = {            definitions.ANYREF_TYPE(),            definitions.FUNCTION_TYPE(argtypes, restype) };	ClassSymbol clazz = new ClassSymbol(	    pos, Names.ANON_CLASS_NAME.toTypeName(), owner, 0);        clazz.setInfo(Type.compoundType(parentTypes, new Scope(), clazz));	clazz.allConstructors().setInfo(	    Type.MethodType(Symbol.EMPTY_ARRAY, clazz.typeConstructor()));	Symbol applyMeth = new TermSymbol(pos, Names.apply, clazz, FINAL)	    .setInfo(Type.MethodType(params, restype));	clazz.info().members().enter(applyMeth);	for (int i = 0; i < params.length; i++) {	    params[i].setOwner(applyMeth);	}	changeOwner(body, owner, applyMeth);        Tree[] parentTrees = mkPrimaryConstrs(pos, parentTypes);        Tree[] memberTrees = { DefDef(applyMeth, body) };        Symbol local = TermSymbol.newLocalDummy(clazz);        Tree classDef = ClassDef(clazz, parentTrees, local, memberTrees);	Tree alloc = New(pos, mkPrimaryConstr(pos, clazz))            .setType(parentTypes[1]); // !!!	return Block(new Tree[]{classDef, alloc});    }