diff options
author | Paul Phillips <paulp@improving.org> | 2012-12-09 19:40:29 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-12-12 10:57:48 -0800 |
commit | b26f12d4b116799e8860ddfd27ad398bc0c80b6a (patch) | |
tree | 5e28f7103b20dc3a15df91674084923d14ebca3b /src/compiler/scala/tools/nsc/transform/CleanUp.scala | |
parent | 00eb7af51d446b3e6aa963ad14b2a4d93dd4c69c (diff) | |
download | scala-b26f12d4b116799e8860ddfd27ad398bc0c80b6a.tar.gz scala-b26f12d4b116799e8860ddfd27ad398bc0c80b6a.tar.bz2 scala-b26f12d4b116799e8860ddfd27ad398bc0c80b6a.zip |
Cleanup in module var creation.
When all the logic in a method is for symbol creation,
and then at the last minute it throws on a hastily zipped
ValDef, it's really not a tree generation method, it's a
symbol creation method.
Eliminated redundancy and overgeneralization; marked some
bits for further de-duplication. Did my best with my limited
archeological skills to document what is supposed to be
happening in eliminateModuleDefs.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/CleanUp.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/CleanUp.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index 765ef39e6b..39460ef004 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -620,9 +620,8 @@ abstract class CleanUp extends Transform with ast.TreeDSL { // create a symbol for the static field val stfieldSym = ( currentClass.newVariable(mkTerm("symbol$"), pos, PRIVATE | STATIC | SYNTHETIC | FINAL) - setInfo SymbolClass.tpe + setInfoAndEnter SymbolClass.tpe ) - currentClass.info.decls enter stfieldSym // create field definition and initialization val stfieldDef = theTyper.typedPos(pos)(VAL(stfieldSym) === rhs) |