summaryrefslogblamecommitdiff
path: root/test/files/neg/tcpoly_variance.scala
blob: 812293811347d9d97bbf136e91aaf2ca1cb720c9 (plain) (tree)
1
2
3
4
5
6
7






                                                                                                      
class A[m[x]] {
 def str: m[Object] = error("foo")
}

class B[m[x]] extends A[m] {
 override def str: m[String]  = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object]
}