The docs state that it is possible to make an enumeration class whose members are exactly of a certain type by adding that type as a mixin to the enum class: