diff options
Diffstat (limited to 'test/files/neg/t7872c.scala')
-rw-r--r-- | test/files/neg/t7872c.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/t7872c.scala b/test/files/neg/t7872c.scala new file mode 100644 index 0000000000..fa12a523b5 --- /dev/null +++ b/test/files/neg/t7872c.scala @@ -0,0 +1,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)) +} |