I am a bit confused about Scala traits. What is the exact meaning of
val myList = List[MyTrait]
where MyTrait
is a trait.
Does't that mean that myList
can contain any instance of class (MyClass
) that mixes-in MyTrait
?
If so, isn't it a bit weird because MyClass
is not a MyTrait
(or is it ?).
Thanks for your help.