1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
//
}
|