diff options
author | Martin Odersky <odersky@gmail.com> | 2009-11-10 13:15:43 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-11-10 13:15:43 +0000 |
commit | 928c9eba3bd7b6af7eadb2ef37fcac44b09a3968 (patch) | |
tree | 3b239f63c24bbd4bae02de658023a1e581232d3f | |
parent | dcc8d01366ae5bc390e15feee6ac58f3830d347a (diff) | |
download | scala-928c9eba3bd7b6af7eadb2ef37fcac44b09a3968.tar.gz scala-928c9eba3bd7b6af7eadb2ef37fcac44b09a3968.tar.bz2 scala-928c9eba3bd7b6af7eadb2ef37fcac44b09a3968.zip |
Fixed #2591
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index fd9be9e788..4da47d58dd 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -475,8 +475,9 @@ trait Contexts { self: Analyzer => case ImportSelector(from, _, to, _) :: sels1 => var impls = collect(sels1) filter (info => info.name != from) if (to != nme.WILDCARD) { - val sym = imp.importedSymbol(to) - if (sym.hasFlag(IMPLICIT)) impls = new ImplicitInfo(to, pre, sym) :: impls + for (sym <- imp.importedSymbol(to).alternatives) + if (sym.hasFlag(IMPLICIT) && isAccessible(sym, pre, false)) + impls = new ImplicitInfo(to, pre, sym) :: impls } impls } |