F-bounded quantification through type member instead of type parameter?
问题 I would like to move a type parameter to a type member. This is the starting point which works: trait Sys[S <: Sys[S]] { type Tx type Id <: Identifier[S#Tx] } trait Identifier[Tx] { def dispose()(implicit tx: Tx): Unit } trait Test[S <: Sys[S]] { def id: S#Id def dispose()(implicit tx: S#Tx) { id.dispose() } } What annoys me is that I'm carrying around a type parameter [S <: Sys[S]] throughout my entire libraries. So what I was thinking is this: trait Sys { type S = this.type // ? type Tx