blob: 26e485c1605a98f78ca6454cbb0c52b90d29ee02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
object Test {
abstract class <~<[-From, +To] extends (From => To)
implicit def trivial[A]: A <~< A = error("")
trait Forcible[T]
implicit val forcibleInt: (Int <~< Forcible[Int]) = error("")
def headProxy[P <: Forcible[Int]](implicit w: Int <~< P): P = error("")
headProxy
// trivial[Int] should not be considered a valid implicit, since w would have type Int <~< Int,
// and headProxy's type parameter P cannot be instantiated to Int
}
|