summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2015-10-05 07:59:18 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2015-10-05 07:59:18 +0200
commit611d1c7744b8c2286ddd1aa98cc158df35a0ed43 (patch)
tree496382b321c9f2610a0f232aa57528d30b8f6581
parente04cc7e3aeda80d09196841da669bdc8af8a803d (diff)
parent5db2d831a79f6ea3edcc305e325be84c21e53c85 (diff)
downloadscala-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
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala7
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) {