summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-07-08 14:32:15 +0000
committerMartin Odersky <odersky@gmail.com>2003-07-08 14:32:15 +0000
commit1ec3e2c664213c8df4a6736314992010b7640dea (patch)
tree319b15699bcc518074443545fc02aa60648a419a
parent2aec262f780132de8700921b3b5fdf92243dc442 (diff)
downloadscala-1ec3e2c664213c8df4a6736314992010b7640dea.tar.gz
scala-1ec3e2c664213c8df4a6736314992010b7640dea.tar.bz2
scala-1ec3e2c664213c8df4a6736314992010b7640dea.zip
*** empty log message ***
-rw-r--r--sources/scalac/ast/TreeGen.java4
-rw-r--r--sources/scalac/transformer/LambdaLift.java4
-rw-r--r--sources/scalac/typechecker/DeSugarize.java6
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;
}