summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-06-07 06:17:49 +0200
committerJason Zaugg <jzaugg@gmail.com>2015-09-01 18:13:56 +1000
commit3ccd8f0806910536f1802d2e842b1efbc07e5ec4 (patch)
tree800c6af3ebab1566e056d7bf56327f67c40906d1 /src/compiler/scala/tools/nsc/typechecker/Implicits.scala
parent2ca3f8b7a0e526ee255dad60f79b0fb33bad5d39 (diff)
downloadscala-3ccd8f0806910536f1802d2e842b1efbc07e5ec4.tar.gz
scala-3ccd8f0806910536f1802d2e842b1efbc07e5ec4.tar.bz2
scala-3ccd8f0806910536f1802d2e842b1efbc07e5ec4.zip
SI-4438 FindAll implicits after error
Fix cross talk between candidates in ImplicitComputation#findAll. Haoyi reported that he couldn't get the presentation compiler to offer completion suggestions for extension methods on primitive arrays. Turns out that an error in typechecking the previous candidate had not been cleared, and this was taken to mean that `arrayIntOps` was itself ineligible. After this patch: ``` scala> Array(1, 2, 3) reverse reverseIterator reverse reverseMap reversed scala> Array(1,2,3).reverse //print scala.Predef.intArrayOps(scala.Array.apply(1, 2, 3)).reverse scala> Array(1, 2, 3) to toString toCollection toSeq toIterator to toMap toSet toList toArray toBuffer toStream toIterable toTraversable toVector toIndexedSeq scala> Array(1, 2, 3) toSeq override def toSeq: Seq[Int] ```
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 098653fd1f..494e1e49b7 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -920,7 +920,7 @@ trait Implicits {
/** Returns all eligible ImplicitInfos and their SearchResults in a map.
*/
- def findAll() = linkedMapFrom(eligible)(typedImplicit(_, ptChecked = false, isLocalToCallsite))
+ def findAll() = linkedMapFrom(eligible)(x => try typedImplicit(x, ptChecked = false, isLocalToCallsite) finally context.reporter.clearAll())
/** Returns the SearchResult of the best match.
*/