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

Unified Diff: lib/src/intersection_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/impl.dart ('k') | lib/src/union_selector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/intersection_selector.dart
diff --git a/lib/src/intersection_selector.dart b/lib/src/intersection_selector.dart
index aa51bf94bb2d31f5cacf0fe8dbacaa8392b3f2bf..8c15254d031493798dbce4fd9fc85028370ebc7a 100644
--- a/lib/src/intersection_selector.dart
+++ b/lib/src/intersection_selector.dart
@@ -32,4 +32,11 @@ class IntersectionSelector implements BooleanSelector {
}
String toString() => "($_selector1) && ($_selector2)";
+
+ bool operator==(other) =>
+ other is IntersectionSelector &&
+ _selector1 == other._selector1 &&
+ _selector2 == other._selector2;
+
+ int get hashCode => _selector1.hashCode ^ _selector2.hashCode;
}
« no previous file with comments | « lib/src/impl.dart ('k') | lib/src/union_selector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698