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 mkPartialFunction(int pos, Tree applyVisitor, Tree isDefinedAtVisitor,				  Type pattype, Type restype, Symbol owner) {	ClassSymbol clazz = new ClassSymbol(	    pos, Names.ANON_CLASS_NAME.toTypeName(), owner, 0);        Type[] parentTypes = {            definitions.ANYREF_TYPE(),            definitions.PARTIALFUNCTION_TYPE(pattype, restype)};	clazz.setInfo(Type.compoundType(parentTypes, new Scope(), clazz));	clazz.allConstructors().setInfo(	    Type.MethodType(Symbol.EMPTY_ARRAY, clazz.typeConstructor()));        Tree[] parentTrees = mkPrimaryConstrs(pos, parentTypes);        Tree[] memberTrees = {            makeVisitorMethod(pos, Names.apply, applyVisitor,                              pattype, restype, clazz, owner),            makeVisitorMethod(pos, Names.isDefinedAt, isDefinedAtVisitor,                              pattype, definitions.BOOLEAN_TYPE(), clazz, owner)};        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});    }