diff options
author | paltherr <paltherr@epfl.ch> | 2004-01-21 18:40:36 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-01-21 18:40:36 +0000 |
commit | 8822af3c413ac366369f4b7dfbc52e2f16cc63f3 (patch) | |
tree | d115228de290e7fc1e3a751698f28d550db92461 /sources | |
parent | b411d98cb9fab103fa29366cb2054199f4ef0d41 (diff) | |
download | scala-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
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/ast/Transformer.java.tmpl | 13 |
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); |