From 1ec3e2c664213c8df4a6736314992010b7640dea Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 8 Jul 2003 14:32:15 +0000 Subject: *** empty log message *** --- sources/scalac/ast/TreeGen.java | 4 ++-- sources/scalac/transformer/LambdaLift.java | 4 ---- sources/scalac/typechecker/DeSugarize.java | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index f18aa78d6d..ca34a8dc4d 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -606,7 +606,7 @@ public class TreeGen implements Kinds, Modifiers { Tree applyDef = DefDef(applyMeth, body); Tree classDef = ClassDef(clazz, new Tree[]{applyDef}); Tree alloc = New(pos, Type.localThisType, clazz, Tree.EMPTY_ARRAY); - return Block(new Tree[]{classDef, alloc}); + return Block(new Tree[]{classDef, alloc}).setType(ft); } public Tree mkPartialFunction(int pos, Tree applyVisitor, Tree isDefinedAtVisitor, @@ -625,7 +625,7 @@ public class TreeGen implements Kinds, Modifiers { makeVisitorMethod(pos, Names.isDefinedAt, isDefinedAtVisitor, pattype, definitions.BOOLEAN_TYPE, clazz, owner)}); Tree alloc = New(pos, Type.localThisType, clazz, Tree.EMPTY_ARRAY); - return Block(new Tree[]{classDef, alloc}); + return Block(new Tree[]{classDef, alloc}).setType(pft); } //where private Tree makeVisitorMethod(int pos, Name name, Tree visitor, diff --git a/sources/scalac/transformer/LambdaLift.java b/sources/scalac/transformer/LambdaLift.java index 19442ce50f..201c2b6152 100644 --- a/sources/scalac/transformer/LambdaLift.java +++ b/sources/scalac/transformer/LambdaLift.java @@ -536,10 +536,6 @@ public class LambdaLift extends OwnerTransformer } } - boolean isLocal() { - return currentOwner.kind == VAL && currentOwner.name != Names.EMPTY; - } - Type addParams(Type tp, Symbol[] newparams) { if (newparams.length == 0) return tp; switch (tp) { diff --git a/sources/scalac/typechecker/DeSugarize.java b/sources/scalac/typechecker/DeSugarize.java index 89f82cec0d..df97f9623f 100644 --- a/sources/scalac/typechecker/DeSugarize.java +++ b/sources/scalac/typechecker/DeSugarize.java @@ -631,9 +631,9 @@ public class DeSugarize implements Kinds, Modifiers { Tree toFunction(Tree tree, Type type) { switch(type) { case MethodType(Symbol[] vparams, Type restpe): - return this.Function( - make.Function(tree.pos, toVparams(vparams), toFunction(tree, restpe)), - restpe); + return //this.Function( + make.Function(tree.pos, toVparams(vparams), toFunction(tree, restpe)); + //restpe); default: return tree; } -- cgit v1.2.3