1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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 = ??? }