I would like to define a generic such that its type parameter does NOT extend a given type.
For example,
trait myTrait[T <: Throwable] {
// ....
}
would define a trait where its type parameter extends Throwable. I want something like (not real Scala code):
trait myTrait[T Not(<:) Throwable] {
// ....
}
Where the type type parameter does NOT extend Throwable. Is there a way to construct such a notion in Scala?