diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-03-31 11:43:35 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-31 10:33:09 -0700 |
commit | 5e795fc8bb53a016d0dff4127d83df4192f1cc13 (patch) | |
tree | d4b79e944e769a34eb6c0a9bffd3a99393027b64 /test | |
parent | a5728ed41639c1791c2ad06a0a99295950ee49af (diff) | |
download | scala-5e795fc8bb53a016d0dff4127d83df4192f1cc13.tar.gz scala-5e795fc8bb53a016d0dff4127d83df4192f1cc13.tar.bz2 scala-5e795fc8bb53a016d0dff4127d83df4192f1cc13.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/pending/pos/t8460.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/pending/pos/t8460.scala b/test/pending/pos/t8460.scala new file mode 100644 index 0000000000..10d2ed432c --- /dev/null +++ b/test/pending/pos/t8460.scala @@ -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 + // + +} |