Will it be back compatible to change nullable type to non-nullable?

Viewed 27

For example, if I change the following data type bool?

[ProtoMember(10)]
public bool? HasEmail { get; set; }

to bool. Will it be a breakchange?

[ProtoMember(10)]
public bool HasEmail { get; set; }

The the logic to write HasEmail has been changed with ...?? false so it will never be null in the future.

The data will be stored in Redis. And some other program may try to read it using type bool? or bool.

0 Answers
Related