Chromium Code Reviews| Index: sdk/lib/collection/hash_set.dart |
| diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart |
| index 86c69c81ee5f4346fea08f0b42fbfc8bec58300f..c30f1bffdada1bf9882a96e5513bf2bdd4202f00 100644 |
| --- a/sdk/lib/collection/hash_set.dart |
| +++ b/sdk/lib/collection/hash_set.dart |
| @@ -6,6 +6,8 @@ part of dart.collection; |
| /** Common parts of [HashSet] and [LinkedHashSet] implementations. */ |
| abstract class _HashSetBase<E> extends IterableBase<E> implements Set<E> { |
| + static List _toStringList = new List(); |
| + |
| // Set. |
| bool containsAll(Iterable<Object> other) { |
| for (Object object in other) { |
| @@ -53,7 +55,17 @@ abstract class _HashSetBase<E> extends IterableBase<E> implements Set<E> { |
| retainWhere(retainSet.contains); |
| } |
| - String toString() => ToString.iterableToString(this); |
| + String toString() { |
| + for(int i = 0; i < _toStringList.length; i++) { |
| + if(identical(_toStringList[i], this)) |
| + return '{...}'; |
| + } |
| + _toStringList.add(this); |
| + String result = IterableMixinWorkaround.toStringIterable(this); |
| + _toStringList.remove(this); |
|
floitsch
2013/07/08 12:00:50
Same comments as before.
zarah
2013/07/08 14:35:15
Done.
|
| + print(result); |
|
floitsch
2013/07/08 12:00:50
Remove debug print.
zarah
2013/07/08 14:35:15
Done.
|
| + return result; |
| + } |
| } |
| /** |