Reputation: 83
What's wrong with that Scala Code?
trait A[E]
trait B[E, F[_]] extends A[F[E]]
trait C[E]
trait D[E] extends B[E, C[E]]
It produces the error message "C[E] takes no type parameters, expected: one"
Is it a compiler (2.10.3) bug?
Thank you
Upvotes: 1
Views: 89
Reputation: 144206
I think D
should be defined as:
trait D[E] extends B[E, C]
The second generic argument to B
should take a single type parameter, while C[E]
doesn't take any.
Upvotes: 5