summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-07-19 08:04:43 -0700
committerPaul Phillips <paulp@improving.org>2012-07-19 09:34:37 -0700
commitb68d57210abe536ee43a8a1c4ec4b4629145ccc2 (patch)
treeaa34f38aee7ee992f32df796571aff571f9d2962 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent79026e6975b1f27750be968eab239ad456ebd64f (diff)
downloadscala-b68d57210abe536ee43a8a1c4ec4b4629145ccc2.tar.gz
scala-b68d57210abe536ee43a8a1c4ec4b4629145ccc2.tar.bz2
scala-b68d57210abe536ee43a8a1c4ec4b4629145ccc2.zip
Expanded use of HIDDEN flag.
Like the comment says: /** Symbols which are marked HIDDEN. (Expand this list?) * * - $outer fields and accessors * - super accessors * - protected accessors * - lazy local accessors * - bridge methods * - default argument getters * - evaluation-order preserving locals for right-associative and out-of-order named arguments * - catch-expression storing vals * - anything else which feels a setFlag(HIDDEN) */ I also changed a few safe-appearing locations to check isHidden rather than isSynthetic. Review by @dragos, @odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 48fd6ba928..c2d520f8ec 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -556,7 +556,7 @@ trait Namers extends MethodSynthesis {
// via "x$lzy" as can be seen in test #3927.
val sym = (
if (owner.isClass) createFieldSymbol(tree)
- else owner.newValue(tree.name append nme.LAZY_LOCAL, tree.pos, tree.mods.flags & ~IMPLICIT)
+ else owner.newValue(tree.name append nme.LAZY_LOCAL, tree.pos, (tree.mods.flags | HIDDEN) & ~IMPLICIT)
)
enterValSymbol(tree, sym setFlag MUTABLE setLazyAccessor lazyAccessor)
}
@@ -577,7 +577,7 @@ trait Namers extends MethodSynthesis {
case DefDef(_, nme.CONSTRUCTOR, _, _, _, _) =>
assignAndEnterFinishedSymbol(tree)
case DefDef(mods, name, tparams, _, _, _) =>
- val bridgeFlag = if (mods hasAnnotationNamed tpnme.bridgeAnnot) BRIDGE else 0
+ val bridgeFlag = if (mods hasAnnotationNamed tpnme.bridgeAnnot) BRIDGE | HIDDEN else 0
val sym = assignAndEnterSymbol(tree) setFlag bridgeFlag
if (name == nme.copy && sym.isSynthetic)