Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/src/protobuf/generated_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ abstract class GeneratedMessage {
// TODO(antonm): move to getters.
int getTagNumber(String fieldName) => info_.tagNumber(fieldName);

bool operator ==(other) =>
other is GeneratedMessage ? _fieldSet._equals(other._fieldSet) : false;
bool operator ==(other) {
if (identical(this, other)) return true;
return other is GeneratedMessage
? _fieldSet._equals(other._fieldSet)
: false;
}

/// Calculates a hash code based on the contents of the protobuf.
///
Expand Down