summaryrefslogtreecommitdiff
path: root/test/files/neg/variances.check
blob: 5c8ddd515985ba30a9a497b672225f032de20809 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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:14: error: covariant type A occurs in contravariant position in type A of value a
    private[this] def setA(a : A) = this.a = a 
                           ^
variances.scala:16: error: covariant type A occurs in invariant position in supertype test.C[A] with ScalaObject of object Baz
    object Baz extends C[A]
           ^
three errors found