Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: lib/src/union_selector.dart

Issue 1715553002: Define equality for boolean selectors. (Closed) Base URL: git@github.com:dart-lang/boolean_selector@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/intersection_selector.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/union_selector.dart
diff --git a/lib/src/union_selector.dart b/lib/src/union_selector.dart
index 6b6cf87dad04f512c19a1beb8f5713529f82a9d2..f513f6c1db22ea65611728054c4745fe95d6cd85 100644
--- a/lib/src/union_selector.dart
+++ b/lib/src/union_selector.dart
@@ -30,4 +30,11 @@ class UnionSelector implements BooleanSelector {
}
String toString() => "($_selector1) && ($_selector2)";
+
+ bool operator==(other) =>
+ other is UnionSelector &&
+ _selector1 == other._selector1 &&
+ _selector2 == other._selector2;
+
+ int get hashCode => _selector1.hashCode ^ _selector2.hashCode;
}
« no previous file with comments | « lib/src/intersection_selector.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698