Make the type non-nullable when there is a default
ejpcmac opened this issue · 0 comments
ejpcmac commented
When there is a default value for a field, it can’t be nil
but if you set it to nil
when creating a struct. In this case, this is the same as putting an integer in a string field: this is a type mismatch. To allow nullability on a field with default, the type should explicitely state | nil
.