I have a class which looks like this:
class X[A <: Throwable, B, C](b: B, c: C)
A, B and C can be inferred, so I can just instantiate it with:
val x = new X(3, 4)
which gives me an X[Nothing, Int, Int] - often what I want.
but I sometimes want to specify A to be something other than Nothing (say AssertionError). Is this possible without also specifying B and C. I imagined syntax along the lines of:
val x = new X[AssertionError](3, 4)
val x = new X[AssertionError, _, _](3, 4)
val x = new X[AssertionError,,](3, 4)
but obviously this doesn't work.
Is there some syntax for this, or some way I can achieve the same result?