Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor handling of failures in implicit search
Better encapsulation for `DivergentImplicitRecovery` by replacing the vars `countDown` and `implicitSym` with a single var holding `Option[DivergentImplicitTypeError]`. Also adds a pending test for SI-8460 that will be addressed in the next commit. This commit is just groundwork and should not change any results of implicit search.
- Loading branch information
Showing
2 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
object tan extends UFunc { | ||
implicit def ImplDouble: Impl[Double, Double] = ??? | ||
} | ||
|
||
trait UFunc { | ||
trait TC[+A] | ||
type Impl[V, VR] = UFunc.UImpl[this.type, V, VR] | ||
} | ||
|
||
object UFunc { | ||
class UImpl[A, B, C] | ||
implicit def implicitDoubleUTag[Tag, V, VR](implicit conv: V=>Double, impl: UImpl[Tag, Double, VR]):UImpl[Tag, V, VR] = ??? | ||
|
||
} | ||
|
||
object Test { | ||
implicitly[tan.Impl[Double, Double]] | ||
// we should discard the one and only divergent implicit (`implicitDoubleUTag`) | ||
// This is done under `scalac-hash v2.10.4 test.scala`, but not under | ||
// `scalac-hash v2.10.4 -Xdivergence211 test.scala` | ||
// | ||
// This seems to be because the companion implicits contain redundant entries | ||
// | ||
|
||
} |