1) Start with
E extends D[E]
2) Extensions imply subtyping in Scala, therefore
E <: D[E]
3) Due to the definition of "class D [T <: D [T]]", the requirement of T for any D [T] is that T <: D [T]. Step 2 said that E should be able to be connected to T, so it better meets this requirement. Substituting E for T, we obtain the requirement that
E <: D[E]
We already showed E <: D [E] in step 2. We are done.
James ry
source share