aboutsummaryrefslogblamecommitdiff
path: root/tests/untried/neg/t7872c.scala
blob: 112248bc8f09ecc8856fd74abb894774ec7568ab (plain) (tree)
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))
}