Meredith Gregory wrote:
> All,
>
> Here is a little codesnippet <
http://paste.pocoo.org/show/125132/>.
> Everything is fine up to the last decl. That generates the following
> compiler error.
Can't say I fully understand higher kinded types. A little example
influenced by your code:
trait T[A[_] <: T[A, B], B]
trait T2[B] extends T[T2, B]
This is valid Scala code, but what does it mean? I can see two
possibilities:
- There exists a C for which "T2[C] <: T[T2, B]" holds, which obviously
is true if C = B. But how is this even useful?
- For all C "T2[C] <: T[T2, B]" must hold, which clearly is not true and
would indicate a compiler bug.
/Jesper Nordenberg