For instance a Set
that contains Integer
types like UInt8
, Int64
, and so on. Or a Set
that contains Exception
types.
First instinct would be
Set{Type{Exception}}()
But that can only store the type Exception
You can use
Set{DataType}()
But that just lets any type into the Set
.
Is there a way to make a Set
that can only contain children of some superset?