diff options
author | Martin Odersky <odersky@gmail.com> | 2009-07-24 15:28:37 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-07-24 15:28:37 +0000 |
commit | 40707e0f49eb991ba1cbc07bdb1bcf65a640006b (patch) | |
tree | 00b6b70e32b941f9aa4502a91ad07fd0fc807e3d /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 8a78d3748319811d7b0adc80d4ee8926dc8d90bf (diff) | |
download | scala-40707e0f49eb991ba1cbc07bdb1bcf65a640006b.tar.gz scala-40707e0f49eb991ba1cbc07bdb1bcf65a640006b.tar.bz2 scala-40707e0f49eb991ba1cbc07bdb1bcf65a640006b.zip |
switch to unnested packages.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 114525aabc..bd969eb13f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -4,7 +4,8 @@ */ // $Id$ -package scala.tools.nsc.typechecker +package scala.tools.nsc +package typechecker import symtab.Flags._ import scala.tools.nsc.util.{Position,NoPosition} @@ -390,8 +391,9 @@ trait Contexts { self: Analyzer => */ def isAccessible(sym: Symbol, pre: Type, superAccess: Boolean): Boolean = { - /** Are we inside definition of `owner'? */ - def accessWithin(owner: Symbol): Boolean = { + /** Are we inside definition of `sym'? */ + def accessWithin(sym: Symbol): Boolean = this.owner.ownerChain contains sym +/* var c = this while (c != NoContext && c.owner != owner) { if (c.outer eq null) assert(false, "accessWithin(" + owner + ") " + c);//debug @@ -400,7 +402,7 @@ trait Contexts { self: Analyzer => } c != NoContext } - +*/ /** Is `clazz' a subclass of an enclosing class? */ def isSubClassOfEnclosing(clazz: Symbol): Boolean = enclosingSuperClassContext(clazz) != NoContext |