summaryrefslogtreecommitdiff
path: root/test/files/neg/t7872c.scala
blob: fa12a523b5f8e5d015b2341ac40408acb5ee15f6 (plain) (blame)
1
2
3
4
5
6
7
8
object coinv {
  def up[F[+_]](fa: F[String]): F[Object] = fa
  def down[F[-_]](fa: F[Object]): F[String] = fa
 
  up(List("hi"))
  // [error] type A is covariant, but type _ is declared contravariant
  down(List('whatever: Object))
}