aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/i39.scala
blob: 8a13a7d06315766c68dd49f918e6bbd21837c839 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


               
                        








                           
                                           




                           
object i39neg {

  trait B {
    type D <: { type T }
    def d: D
  }

  val bc: B = new B {
    def d: D = ???
    private def pd: D = ???
  }

  val d: bc.D = bc.d
  val pd: bc.D = bc.pd             // error

  // infinite loop in Typer
  val asT: d.T = ???

}