1 2 3 4 5 6 7 8 9 10
class Cl { class Sub[TheSub <: Sub[TheSub]] } case class Wrapper[T](v: T) object O { def wrap[S <: Cl#Sub[S]](v: S): Wrapper[S] = { } }