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

Unified Diff: lib/src/wrappers.dart

Issue 2418763002: Update Set.difference to take a Set<Object>. (Closed)
Patch Set: Updated version number. Created 4 years, 2 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/typed_wrappers.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/wrappers.dart
diff --git a/lib/src/wrappers.dart b/lib/src/wrappers.dart
index 752987b10180648306817a9891bb27c816f79c22..92760f60843d3c69e5f44fcac76cbb217f6f8e4b 100644
--- a/lib/src/wrappers.dart
+++ b/lib/src/wrappers.dart
@@ -253,7 +253,7 @@ class DelegatingSet<E> extends DelegatingIterable<E> implements Set<E> {
bool containsAll(Iterable<Object> other) => _setBase.containsAll(other);
- Set<E> difference(Set<E> other) => _setBase.difference(other);
+ Set<E> difference(Set<Object> other) => _setBase.difference(other);
Set<E> intersection(Set<Object> other) => _setBase.intersection(other);
@@ -436,7 +436,7 @@ class MapKeySet<E> extends _DelegatingIterableBase<E>
///
/// Note that the returned set will use the default equality operation, which
/// may be different than the equality operation [this] uses.
- Set<E> difference(Set<E> other) =>
+ Set<E> difference(Set<Object> other) =>
where((element) => !other.contains(element)).toSet();
/// Returns a new set which is the intersection between [this] and [other].
@@ -537,7 +537,7 @@ class MapValueSet<K, V> extends _DelegatingIterableBase<V> implements Set<V> {
///
/// Note that the returned set will use the default equality operation, which
/// may be different than the equality operation [this] uses.
- Set<V> difference(Set<V> other) =>
+ Set<V> difference(Set<Object> other) =>
where((element) => !other.contains(element)).toSet();
/// Returns a new set which is the intersection between [this] and [other].
« no previous file with comments | « lib/src/typed_wrappers.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698