From 89bdc30d8cf5ac024faf282c97787c9867057133 Mon Sep 17 00:00:00 2001 From: Claire Sarsam Date: Tue, 7 Aug 2018 14:40:06 -0700 Subject: [PATCH] Update to correct static analysis error --- lib/src/diff/diff.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/diff/diff.dart b/lib/src/diff/diff.dart index d8d10c5..69c6349 100644 --- a/lib/src/diff/diff.dart +++ b/lib/src/diff/diff.dart @@ -68,11 +68,12 @@ class Diff { /** * Is this Diff equivalent to another Diff? * - * [other] is another Diff to compare against. + * [other] is another object to compare against. * - * Returns true or false. + * Returns true or false based on whether [other] is a Diff with the same [operation] + * and [text] values as this Diff. */ - bool operator ==(Diff other) { - return (operation == other.operation && text == other.text); + bool operator ==(other) { + return other is Diff && operation == other.operation && text == other.text; } }