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


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

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