aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/subtyping.scala
blob: a4a5a3d19faac4ba250aadef994514849c0c0e61 (plain) (tree)
1
2
3
4
5
6
7
8
9





                 
                       
                           
   



                                    
 
class B {
  class X
}
class A extends B

object Test {
  def test1(): Unit = {
    implicitly[B#X <:< A#X]
  }
  def test2(): Unit = {
    val a : { type T; type U } = ???
    implicitly[a.T <:< a.U]
  }
}