diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2013-02-19 17:16:13 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2013-04-26 16:20:38 +0200 |
commit | accaa314f3473553d9ffaff8c37e3c5b29f0f2e3 (patch) | |
tree | b020cbdb01a335ce41aa597c8f3cef8551b0370e /src/interactive | |
parent | f33af58f3b6538398da6974275099fb18560e92d (diff) | |
download | scala-accaa314f3473553d9ffaff8c37e3c5b29f0f2e3.tar.gz scala-accaa314f3473553d9ffaff8c37e3c5b29f0f2e3.tar.bz2 scala-accaa314f3473553d9ffaff8c37e3c5b29f0f2e3.zip |
SI-7291: No exception throwing for diverging implicit expansion
Since we don't throw exceptions for normal errors it was a bit odd
that we don't do that for DivergingImplicit.
As SI-7291 shows, the logic behind catching/throwing exception
was broken for divergence. Instead of patching it, I rewrote
the mechanism so that we now another SearchFailure type related
to diverging expansion, similar to ambiguous implicit scenario.
The logic to prevent diverging expansion from stopping the search
had to be slightly adapted but works as usual.
The upside is that we don't have to catch diverging implicit
for example in the presentation compiler which was again showing
that something was utterly broken with the exception approach.
Diffstat (limited to 'src/interactive')
-rw-r--r-- | src/interactive/scala/tools/nsc/interactive/Global.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala index 43b8bd2738..792ca6efa6 100644 --- a/src/interactive/scala/tools/nsc/interactive/Global.scala +++ b/src/interactive/scala/tools/nsc/interactive/Global.scala @@ -15,7 +15,7 @@ import scala.reflect.internal.util.{ SourceFile, BatchSourceFile, Position, NoPo import scala.tools.nsc.reporters._ import scala.tools.nsc.symtab._ import scala.tools.nsc.doc.ScaladocAnalyzer -import scala.tools.nsc.typechecker.{ Analyzer, DivergentImplicit } +import scala.tools.nsc.typechecker.Analyzer import symtab.Flags.{ACCESSOR, PARAMACCESSOR} import scala.annotation.{ elidable, tailrec } import scala.language.implicitConversions @@ -1210,9 +1210,6 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") case ex: TypeError => debugLog("type error caught: "+ex) alt - case ex: DivergentImplicit => - debugLog("divergent implicit caught: "+ex) - alt } } |