The documentation for OptionSet
states that
The
rawValue
property must be of a type that conforms to theFixedWidthInteger
protocol, such asInt
orUInt8
.
But this is seemingly not enforced:
public protocol OptionSet : SetAlgebra, RawRepresentable {
Is this an oversight, or is there some deeper implementation reason that I don't understand? As far as I can tell, the type could be declared as
public protocol OptionSet : SetAlgebra, RawRepresentable where RawValue: FixedWidthInteger {