aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-14 22:34:55 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-14 22:34:55 +0100
commit7e71f3dc5252f4df10cf330eb2ec535338dac992 (patch)
treea49b028d6a2f778a98c8dd94209a6be934ab13a6 /src/dotty/tools/dotc/core
parenta126edd5dfc5605211d0945a5f04a69a88beffa9 (diff)
downloaddotty-7e71f3dc5252f4df10cf330eb2ec535338dac992.tar.gz
dotty-7e71f3dc5252f4df10cf330eb2ec535338dac992.tar.bz2
dotty-7e71f3dc5252f4df10cf330eb2ec535338dac992.zip
Do ot search for implicit members in packages.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 18b5c5f8f..7eea9fd64 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1054,9 +1054,12 @@ object SymDenotations {
def memberNames(keepOnly: NameFilter)(implicit ctx: Context): Set[Name] = {
def computeMemberNames: Set[Name] = {
val inheritedNames = (classParents flatMap (_.memberNames(keepOnly, thisType))).toSet
- var ownSyms = info.decls.toList
- if (keepOnly == implicitFilter) ownSyms = ownSyms filter (_ is Implicit)
- val ownNames = ownSyms.iterator map (_.name)
+ val ownSyms =
+ if (keepOnly == implicitFilter)
+ if (this is Package) Iterator.empty
+ else info.decls.iterator filter (_ is Implicit)
+ else info.decls.iterator
+ val ownNames = ownSyms map (_.name)
val candidates = inheritedNames ++ ownNames
candidates filter (keepOnly(thisType, _))
}