Are there any shortcut type restrictions in Scala?
When defining a covariant class, all method declarations must contain something line by line:
[B >: A] //A is the main type variable
Is there a way to declare something at the class level that makes B available so I don't have to repeat this in every method?
I've tried everything I can think of using type
, but nothing compiled.
+3
source to share