summaryrefslogtreecommitdiff
path: root/sources/scalac/transformer
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-31 12:03:01 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-31 12:03:01 +0000
commit8c3432973c2a9519bdf8e2e74cf7f8a942414871 (patch)
tree4eaf4fb3e33984ea06f463ce248c350d48ee3928 /sources/scalac/transformer
parent8ff5e6c0e540e1b186ffe7925490f2c3f2a34e74 (diff)
downloadscala-8c3432973c2a9519bdf8e2e74cf7f8a942414871.tar.gz
scala-8c3432973c2a9519bdf8e2e74cf7f8a942414871.tar.bz2
scala-8c3432973c2a9519bdf8e2e74cf7f8a942414871.zip
- Changed the return type of initializers to Un...
- Changed the return type of initializers to Unit also for interpreter
Diffstat (limited to 'sources/scalac/transformer')
-rw-r--r--sources/scalac/transformer/AddConstructors.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/sources/scalac/transformer/AddConstructors.java b/sources/scalac/transformer/AddConstructors.java
index bc00cfd709..639328a222 100644
--- a/sources/scalac/transformer/AddConstructors.java
+++ b/sources/scalac/transformer/AddConstructors.java
@@ -84,8 +84,7 @@ public class AddConstructors extends Transformer {
new TermSymbol(classConstr.pos, classConstr.name, owner, flags);
Type constrType = Type.MethodType
- (paramSyms, forINT ? owner.type()
- : global.definitions.UNIT_TYPE());
+ (paramSyms, global.definitions.UNIT_TYPE());
if (tparamSyms.length != 0)
constrType = Type.PolyType(tparamSyms, constrType);
@@ -234,10 +233,7 @@ public class AddConstructors extends Transformer {
rhs = transform(rhs);
subst.removeSymbol(constr.valueParams());
subst.removeSymbol(constr.typeParams());
- Tree result = forINT
- ? gen.This(rhs.pos, constr.constructorClass())
- : gen.mkUnitLit(rhs.pos);
- rhs = gen.mkBlock(new Tree[] { rhs, result });
+ rhs = gen.mkBlock(new Tree[] { rhs, gen.mkUnitLit(rhs.pos) });
return gen.DefDef(init, rhs);
// Substitute the constructor into the 'new' expressions