Can someone explain why the following doesn't compile? I want that BB[A]
is also a List[A]
. The method body only enforces this view.
scala> def x[A, BB[_] <: List[_]](p: BB[A]) {p: List[A]}
<console>:8: error: type mismatch;
found : BB[A]
required: List[A]
def x[A, BB[_] <: List[_]](p: BB[A]) {p: List[A]}
^
p
two times? First as aBB[A]
and then asList[A]
? Or am I missing something obvious? – Janey