Index: lib/src/protobuf/utils.dart |
diff --git a/lib/src/protobuf/utils.dart b/lib/src/protobuf/utils.dart |
index 364d78f21ff96cb5261ffb871bacbed8b4823a64..31fafcc2d5d73fbe8191920dcacca7a4958b0aff 100644 |
--- a/lib/src/protobuf/utils.dart |
+++ b/lib/src/protobuf/utils.dart |
@@ -6,6 +6,10 @@ part of protobuf; |
// TODO(antonm): reconsider later if PbList should take care of equality. |
bool _deepEquals(lhs, rhs) { |
+ // Some GeneratedMessages implement Map, so test this first. |
+ if ((lhs is GeneratedMessage) && (rhs is GeneratedMessage)) { |
Søren Gjesse
2016/04/04 16:06:27
Maybe negate this if to only have one lhs == rhs.
skybrian
2016/04/04 19:38:02
As a style thing, I'd rather repeat the == check t
|
+ return lhs == rhs; |
+ } |
if ((lhs is List) && (rhs is List)) return _areListsEqual(lhs, rhs); |
if ((lhs is Map) && (rhs is Map)) return _areMapsEqual(lhs, rhs); |
if ((lhs is ByteData) && (rhs is ByteData)) { |