This has nothing to do with higher-kinded types. The question is, does IRevisionControl
need to know T
? If not, you can use an existential type
trait Revision[RevisionType]
trait RevisionLog
trait RevisionControl[R <: Revision[_], L <: RevisionLog]
If you need T
, you either have to add it as another type parameter...
trait RevisionControl[T, R <: Revision[T], L <: RevisionLog]
...or you use a type member in Revision
...
trait Revision {
type RevisionType
}
trait RevisionControl[R <: Revision, L <: RevisionLog] {
def foo: R#RevisionType = ???
}