Skip to content

Commit

Permalink
Sync changes from internal repo. (flutter#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobr-google authored May 17, 2018
1 parent 31e583d commit 4c9f987
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 4c9f987

Please sign in to comment.