blob: fa12a523b5f8e5d015b2341ac40408acb5ee15f6 (
plain) (
tree)
|
|
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))
}
|