diff options
Diffstat (limited to 'tests/untried/neg/variances.check')
-rw-r--r-- | tests/untried/neg/variances.check | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/untried/neg/variances.check b/tests/untried/neg/variances.check new file mode 100644 index 000000000..cb1a60a63 --- /dev/null +++ b/tests/untried/neg/variances.check @@ -0,0 +1,25 @@ +variances.scala:4: error: covariant type A occurs in contravariant position in type test.Vector[A] of value x + def append(x: Vector[A]): Vector[A] + ^ +variances.scala:75: error: covariant type A occurs in contravariant position in type => A => A of value m + val m: A => A + ^ +variances.scala:18: error: covariant type A occurs in contravariant position in type A of value a + private def setA3(a : A) = this.a = a + ^ +variances.scala:19: error: covariant type A occurs in contravariant position in type A of value a + protected def setA4(a : A) = this.a = a + ^ +variances.scala:21: error: covariant type A occurs in invariant position in supertype test.C[A] of object Baz + object Baz extends C[A] + ^ +variances.scala:74: error: covariant type A occurs in contravariant position in type => test.Covariant.T[A]{val m: A => A} of value x + val x: T[A] { + ^ +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 + def foo: B[A] + ^ +8 errors found |