diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-14 12:41:40 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-14 14:34:46 -0800 |
commit | 3024efcbf902417017b6ec0a442a3db4cf930d22 (patch) | |
tree | 1eacda2125fe6da847db5959c047ba2df86ecbdf /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | 2ca7d4ff90fedcd2dba654100bd8d6ce1f1ad36b (diff) | |
download | scala-3024efcbf902417017b6ec0a442a3db4cf930d22.tar.gz scala-3024efcbf902417017b6ec0a442a3db4cf930d22.tar.bz2 scala-3024efcbf902417017b6ec0a442a3db4cf930d22.zip |
Putting some of the symbol potential to work.
Renamed the parameter to all the newXXX symbol creators to "newFlags"
because I've seen too many bugs which arose from having a parameter name
which shadows a field and where mistakes can inflict subtle bugs which
won't be found until much later (yes I'm trying to describe "flags" right
now.) Opportunistically cleaned up some symbol creations.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 78b3446157..4c14031da3 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1166,12 +1166,9 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R } def createStaticModuleAccessor() = atPhase(phase.next) { val method = ( - sym.owner.newMethod(sym.pos, sym.name.toTermName) - setFlag (sym.flags | STABLE) - resetFlag MODULE - setInfo NullaryMethodType(sym.moduleClass.tpe) + sym.owner.newMethod(sym.name.toTermName, sym.pos, (sym.flags | STABLE) & ~MODULE) + setInfoAndEnter NullaryMethodType(sym.moduleClass.tpe) ) - sym.owner.info.decls enter method localTyper.typedPos(tree.pos)(gen.mkModuleAccessDef(method, sym)) } def createInnerModuleAccessor(vdef: Tree) = List( |