Say I have a class:
class SomeClass[+A <: AnyRef, +B <: Any]
To specify it I always have to specify the types of generic parameters too. I.e. to specify its most general version as a method parameter type I have to do def someMethod(param1: SomeClass[AnyRef, Any]) or new SomeClass[AnyRef, Any] to instantiate it. It becomes a major pain when it comes to more complex types which have complex generics.
Is there a way to make the [AnyRef, Any] part implied when I don’t provide generic information? For instance def someMethod(param1: SomeClass)?
Is there a way the _ could help me solve this problem and how?
P.S. I apologize for originally not stating the question as clearly.
As suggested in my comment, doing something like this can save some typing and is pretty straightforward: