Index: runtime/lib/collection_patch.dart |
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart |
index 9f0c74fad4a7efd0bc94e22c91b32e61cbf21786..f5a906ec146a040787627d443c46f1a1185e7779 100644 |
--- a/runtime/lib/collection_patch.dart |
+++ b/runtime/lib/collection_patch.dart |
@@ -571,15 +571,16 @@ class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> { |
// Set. |
- void add(E element) { |
+ bool add(E element) { |
int hashCode = _hashCode(element); |
int index = hashCode & (_buckets.length - 1); |
HashSetEntry entry = _buckets[index]; |
while (entry != null) { |
- if (_equals(entry.key, element)) return; |
+ if (_equals(entry.key, element)) return false; |
entry = entry.next; |
} |
_addEntry(element, hashCode, index); |
+ return true; |
} |
void addAll(Iterable<E> objects) { |