Nice way of copying an immutable value while changing only a few of its many properties?

That is expected behaviour, because you’ve given an initial value to a constant (at the declaration site) it cannot be changed. Although there have been discussions around relaxing this restriction, see Explicit Memberwise Initializers

1 Like