From 928c9eba3bd7b6af7eadb2ef37fcac44b09a3968 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 10 Nov 2009 13:15:43 +0000 Subject: Fixed #2591 --- src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 } -- cgit v1.2.3