aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/subtyping.scala
blob: 03ff39be40dd1a84d1872fd219c6c63d531a8825 (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]                           // error
  }
  def test2(): Unit = {
    val a : { type T; type U } = ???                  // error // error
    implicitly[a.T <:< a.U]                           // error
  }
}