aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/hk-variance.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/hk-variance.scala')
-rw-r--r--tests/neg/hk-variance.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/hk-variance.scala b/tests/neg/hk-variance.scala
new file mode 100644
index 000000000..fec5cc366
--- /dev/null
+++ b/tests/neg/hk-variance.scala
@@ -0,0 +1,11 @@
+object Test {
+
+ def f[C[+X]] = ()
+
+ class D[X] {}
+
+ f[D] // error
+
+ def g[E[-Y]] = f[E] // error
+
+}