diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-23 15:02:51 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-23 15:34:28 -0700 |
commit | 9cbbb1ccb50fc0a6c423321494ea360f25736e28 (patch) | |
tree | 9b8d890cb9f4ef81bf57dea0222ce9f142cc3400 /src/compiler | |
parent | f5c336d5660495f7083d7c7b91e48b9621cddbb2 (diff) | |
download | scala-9cbbb1ccb50fc0a6c423321494ea360f25736e28.tar.gz scala-9cbbb1ccb50fc0a6c423321494ea360f25736e28.tar.bz2 scala-9cbbb1ccb50fc0a6c423321494ea360f25736e28.zip |
Adding some comments and clearer naming.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index ad79468b0c..a79fec42bf 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -740,6 +740,9 @@ trait Contexts { self: Analyzer => ) } + /** The symbol with name `name` imported via the import in `imp`, + * if any such symbol is accessible from this context. + */ def importedAccessibleSymbol(imp: ImportInfo, name: Name) = { imp importedSymbol name filter (s => isAccessible(s, imp.qual.tpe, superAccess = false)) } @@ -759,7 +762,7 @@ trait Contexts { self: Analyzer => module.isInitialized && (module.info.member(sym.name).alternatives contains sym) } ) - def isInPkgObj(sym: Symbol) = ( + def inPackageObject(sym: Symbol) = ( !sym.isPackage && !sym.owner.isPackageClass && (sym.owner ne NoSymbol) @@ -767,8 +770,8 @@ trait Contexts { self: Analyzer => ) pkgClass.isPackageClass && ( - if (sym.isOverloaded) sym.alternatives forall isInPkgObj - else isInPkgObj(sym) + if (sym.isOverloaded) sym.alternatives forall inPackageObject + else inPackageObject(sym) ) } |