summaryrefslogtreecommitdiff
path: root/test/files/pos/t2421.scala
blob: 0d01be29fc7800d6b9ed82b1e021ffa8bb3ce456 (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
}