scala/scala — pull request #2428 by hubertp (2013-04-22 11:30:08+00:00)
Title: SI-7291: Don't throw exceptions while encountering diverging 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.

Review by @retronym.