summaryrefslogblamecommitdiff
path: root/test/files/neg/variances.check
blob: 4934053706e746157f3ca4a45c80e41a2ee008ea (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                          
                                                                                                             
                                      
              





                                                                                                                                                          
                    
                  
variances.scala:53: warning: type Character in object Predef is deprecated
    val a : Foo[Character] = new Foo[Character]
                ^
variances.scala:53: warning: type Character in object Predef is deprecated
    val a : Foo[Character] = new Foo[Character]
                                     ^
variances.scala:58: warning: type Character in object Predef is deprecated
    val x : Character = test.a.getA
            ^
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 type test.C[A] with ScalaObject{def this(): object Foo.this.Baz} of object Baz
    object Baz extends C[A]
    ^
three warnings found
three errors found