summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-11-02 16:49:45 +0000
committerPaul Phillips <paulp@improving.org>2010-11-02 16:49:45 +0000
commit8e320487627e85cce44a4eab0d77d28fd0904d50 (patch)
tree4ec432f0c3566e5b4d70aebe1bc9266cf006efd0 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parent543d70e30c153522eedb986755ae3a5de8d820c6 (diff)
downloadscala-8e320487627e85cce44a4eab0d77d28fd0904d50.tar.gz
scala-8e320487627e85cce44a4eab0d77d28fd0904d50.tar.bz2
scala-8e320487627e85cce44a4eab0d77d28fd0904d50.zip
One of those annoying patches for which I apolo...
One of those annoying patches for which I apologize in advance. It's a step toward a better world. Almost all the changes herein are simple transformations of "x hasFlag FOO" to "x.isFoo", with the remainder minor cleanups. It's too big to review, so let's say no review: but I'm still all ears for input on the issues mostly outlined in HasFlags.scala.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 7136945de6..ef0f38a341 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -430,12 +430,12 @@ trait Contexts { self: Analyzer =>
val ab = sym.accessBoundary(sym.owner)
( (ab.isTerm || ab == definitions.RootClass)
|| (accessWithin(ab) || accessWithinLinked(ab)) &&
- ( !sym.hasFlag(LOCAL)
+ ( !sym.hasLocalFlag
|| sym.owner.isImplClass // allow private local accesses to impl classes
- || (sym hasFlag PROTECTED) && isSubThisType(pre, sym.owner)
+ || sym.isProtected && isSubThisType(pre, sym.owner)
|| pre =:= sym.owner.thisType
)
- || (sym hasFlag PROTECTED) &&
+ || sym.isProtected &&
( superAccess
|| pre.isInstanceOf[ThisType]
|| sym.isConstructor
@@ -485,7 +485,7 @@ trait Contexts { self: Analyzer =>
* with the same names. Local symbols override imported ones. This fixes #2866.
*/
private def isQualifyingImplicit(sym: Symbol, pre: Type, imported: Boolean) =
- sym.hasFlag(IMPLICIT) &&
+ sym.isImplicit &&
isAccessible(sym, pre, false) &&
!(imported && {
val e = scope.lookupEntry(sym.name)