We have an object which includes a repeated field called errors.
Here is the return from the generated isEquals method:
return
self.hasType == otherMessage.hasType &&
(!self.hasType || self.type == otherMessage.type) &&
self.hasStatus == otherMessage.hasStatus &&
(!self.hasStatus || self.status == otherMessage.status) &&
self.hasMessage == otherMessage.hasMessage &&
(!self.hasMessage || [self.message isEqual:otherMessage.message]) &&
[self.errorsArray isEqualToArray:otherMessage.errorsArray] &&
[self isEqualExtensionsInOther:otherMessage from:100 to:536870912] &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
In my case errorsArray is nil. I am assuming this is because there were no errors (since zero is a valid number of times for a repeated field). This makes [self.errorsArray isEqualToArray:otherMessage.errorsArray]
returns false. The end result is objects with repeated fields that have zero entries can never test equal.
I can imagine a couple of fixes, e.g. having an empty array instead of nil or changing the test to make both sides being nil a valid situation, however I am not familiar enough with the code to know exactly where to place this. I glanced at the code that generates isEqualToArray but I'm not sure if the adding the nil test is always valid.