Private setter for var in primary constructor


Did not think about that. In that case I agree that the extra keyword should be both in the constructor and on the property


And in android @Parcelize

All parameters of the primary constructor must be properties ( val / var ), otherwise they can not be (de)serialized

  • If there is a non-property parameter, it is a compile-time error