This is similar to the discussion if case classes should allow var-parameters and other var-members or not. I guess it is reasonable to argue by regularity that, as the enum type expands to an abstract class, and you actually need to write modifiers like
private val etc for enum params, then any such relevant modifier should be allowed.
If one argues otherwise, that it should be a deliberate restriction to only allow val-parameters and val-members in enums, then perhaps you shouldn’t even have to write
val at all as with case-classes. But still enums would then be irregular wrt case classes, as the latter do allow mutable parameters and other mutable members.
Note that a parameter is a “special case” of a member that is initialized during construction, so creating mutable enums would still be possible e.g. by including var-members (as with case classes etc), (assuming no hypothetical restriction on var-members in enums, not even private var):
scala> enum Mutant:
| var x: Int = 0
| case Red, Green
// defined class Mutant
scala> val x = Mutant.Red
val x: Mutant = Red
scala> x.x = 42
val res0: Int = 42
More general, this is a choice of pragmatism or purism and Scala tends to go with the former. I think the behaviour of 3.1.0-RC1 makes sense given how enums are expanded: