summaryrefslogtreecommitdiff
path: root/test/files/neg/variances.check
blob: 7d965e94dc0c85e7a632b13fecd1f96f96606682 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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: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]
        ^
7 errors found