summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-01-21 18:40:36 +0000
committerpaltherr <paltherr@epfl.ch>2004-01-21 18:40:36 +0000
commit8822af3c413ac366369f4b7dfbc52e2f16cc63f3 (patch)
treed115228de290e7fc1e3a751698f28d550db92461
parentb411d98cb9fab103fa29366cb2054199f4ef0d41 (diff)
downloadscala-8822af3c413ac366369f4b7dfbc52e2f16cc63f3.tar.gz
scala-8822af3c413ac366369f4b7dfbc52e2f16cc63f3.tar.bz2
scala-8822af3c413ac366369f4b7dfbc52e2f16cc63f3.zip
- Fixed handling of ClassDef in GenTransformer ...
- Fixed handling of ClassDef in GenTransformer for phases after AddConstructors
-rw-r--r--sources/scalac/ast/Transformer.java.tmpl13
1 files changed, 9 insertions, 4 deletions
diff --git a/sources/scalac/ast/Transformer.java.tmpl b/sources/scalac/ast/Transformer.java.tmpl
index bf97e2cbb1..32f69eb3b5 100644
--- a/sources/scalac/ast/Transformer.java.tmpl
+++ b/sources/scalac/ast/Transformer.java.tmpl
@@ -156,10 +156,15 @@ public class GenTransformer {
case ClassDef(_, _, _, _, _, Template impl):
Symbol symbol = getSymbolFor(tree);
- Symbol impl_symbol = getSymbolFor(impl);
- Tree[] parents = transform(impl.parents);
- Tree[] body = transform(impl.body);
- return gen.ClassDef(symbol, parents, impl_symbol, body);
+ if (global.currentPhase.id < global.PHASE.ADDCONSTRUCTORS.id()) {
+ Symbol impl_symbol = getSymbolFor(impl);
+ Tree[] parents = transform(impl.parents);
+ Tree[] body = transform(impl.body);
+ return gen.ClassDef(symbol, parents, impl_symbol, body);
+ } else {
+ Tree[] body = transform(impl.body);
+ return gen.ClassDef(symbol, body);
+ }
case PackageDef(Tree packaged, Template(Tree[] parents, Tree[] body)):
Symbol symbol = getSymbolFor(packaged);