8
直下型再帰だけの作品:間接再帰ジェネリック型定義Scalaでは
CyclicTraits.scala:23: error: type arguments [UU[V]] do not conform to
trait VV's type parameter bounds [U <: UU[VV[U]]]
trait UU[V <: VV[UU[V]]]
^
CyclicTraits.scala:25: error: type arguments [VV[U]] do not conform to
trait UU's type parameter bounds [V <: VV[UU[V]]]
trait VV[U <: UU[VV[U]]]
^
:私にエラーを与える
trait TT[T<:TT[T]]
をしかし、私は単純なアプローチで
trait UU[V <: VV[UU[V]]]
trait VV[U <: UU[VV[U]]]
を間接的なものを作っことができます間接的な型パラメータの再帰を適切に表現する方法