aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t7872c.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t7872c.scala')
-rw-r--r--tests/untried/neg/t7872c.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/untried/neg/t7872c.scala b/tests/untried/neg/t7872c.scala
new file mode 100644
index 000000000..fa12a523b
--- /dev/null
+++ b/tests/untried/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))
+}