Given the following traits and class. Why does this compile? Can this be actually used for something?
trait Container {
type A
}
trait AnotherContainer[B]{
def x(b : B) : B
}
trait Mixed extends Container with AnotherContainer[Container#A]
class Impl extends Mixed{
def x(a : Container#A) = a
}
new Impl().x _
scala> new Impl().x _
res0: (Container#A) => Container#A = <function>
Update:
class Baz { type T; }
Is actually a feature but I could not find the motivation for it: #1753.