diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t8079a.check | 4 | ||||
-rw-r--r-- | test/files/neg/t8079a.scala | 4 | ||||
-rw-r--r-- | test/files/neg/variances.check | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/test/files/neg/t8079a.check b/test/files/neg/t8079a.check new file mode 100644 index 0000000000..6bbe78afa6 --- /dev/null +++ b/test/files/neg/t8079a.check @@ -0,0 +1,4 @@ +t8079a.scala:3: error: contravariant type I occurs in covariant position in type C.this.X of value b + def f2(b: X): Unit + ^ +one error found diff --git a/test/files/neg/t8079a.scala b/test/files/neg/t8079a.scala new file mode 100644 index 0000000000..4997ea282e --- /dev/null +++ b/test/files/neg/t8079a.scala @@ -0,0 +1,4 @@ +trait C[-I] { + private[this] type X = C[I] + def f2(b: X): Unit +} diff --git a/test/files/neg/variances.check b/test/files/neg/variances.check index cb1a60a632..3c1545a375 100644 --- a/test/files/neg/variances.check +++ b/test/files/neg/variances.check @@ -19,7 +19,7 @@ variances.scala:74: error: covariant type A occurs in contravariant position in variances.scala:89: error: covariant type T occurs in invariant position in type T of type A type A = T ^ -variances.scala:90: error: covariant type T occurs in contravariant position in type => test.TestAlias.B[C.this.A] of method foo +variances.scala:90: error: covariant type A occurs in contravariant position in type => test.TestAlias.B[C.this.A] of method foo def foo: B[A] ^ 8 errors found |