diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-10-05 07:59:18 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-10-05 07:59:18 +0200 |
commit | 611d1c7744b8c2286ddd1aa98cc158df35a0ed43 (patch) | |
tree | 496382b321c9f2610a0f232aa57528d30b8f6581 /src | |
parent | e04cc7e3aeda80d09196841da669bdc8af8a803d (diff) | |
parent | 5db2d831a79f6ea3edcc305e325be84c21e53c85 (diff) | |
download | scala-611d1c7744b8c2286ddd1aa98cc158df35a0ed43.tar.gz scala-611d1c7744b8c2286ddd1aa98cc158df35a0ed43.tar.bz2 scala-611d1c7744b8c2286ddd1aa98cc158df35a0ed43.zip |
Merge pull request #4777 from retronym/ticket/ide-1002552
Improve implicits wildcard imports in the IDE
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index c46bc7444a..e73a4c6276 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -823,7 +823,12 @@ trait Contexts { self: Analyzer => case List() => List() case List(ImportSelector(nme.WILDCARD, _, _, _)) => - collectImplicits(pre.implicitMembers, pre, imported = true) + // Using pre.implicitMembers seems to exposes a problem with out-dated symbols in the IDE, + // see the example in https://www.assembla.com/spaces/scala-ide/tickets/1002552#/activity/ticket + // I haven't been able to boil that down the an automated test yet. + // Looking up implicit members in the package, rather than package object, here is at least + // consistent with what is done just below for named imports. + collectImplicits(qual.tpe.implicitMembers, pre, imported = true) case ImportSelector(from, _, to, _) :: sels1 => var impls = collect(sels1) filter (info => info.name != from) if (to != nme.WILDCARD) { |