diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-22 15:02:08 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-22 15:02:08 +0000 |
commit | 7c0ee3acb4f0319040e21c242c10c819db7490ff (patch) | |
tree | 8fe5c5abf7fb91dc73a2fc824ef345d189b6d702 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | c6f4dac7beec147982c91e8129834b2b50299c82 (diff) | |
download | scala-7c0ee3acb4f0319040e21c242c10c819db7490ff.tar.gz scala-7c0ee3acb4f0319040e21c242c10c819db7490ff.tar.bz2 scala-7c0ee3acb4f0319040e21c242c10c819db7490ff.zip |
Some cleanup (mainly in Typers).
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index b524f2e99a..f12d7939ea 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -976,6 +976,10 @@ abstract class RefChecks extends InfoTransform { } } else { def lazyNestedObjectTrees(transformedInfo: Boolean) = { + // transformedInfo flag is necessary here because it is possible + // that the object info was already run through the transformInfo. + // Since we do not want to have duplicate lazy accessors + // (through duplicate nested object -> lazy val transformation) we have this check here. val cdef = ClassDef(mods | MODULE, name, List(), impl) .setPos(tree.pos) .setSymbol(if (!transformedInfo) sym.moduleClass else sym.lazyAccessor) |