I think the problem for AnyKind
is that we did not define the meaning of Nothing
properly.
Current implementation of type inference in Scala compiler 2.x internally use Nothing
for any kind, which sometimes cause bugs.
We should distinguish Nothing
(bottom type for any types that are child types of Any
) from NothingKind
(bottom type for any types that are child types of AnyKind
).
So trait Bar[A <: AnyKind]
is a shortcut of trait Bar[A >: NothingKind <: AnyKind]
.