blob: 112248bc8f09ecc8856fd74abb894774ec7568ab (
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))
}
|