commit | eedddedfaa02e1a0d7214c95c40526b14898ded6 | [log] [tgz] |
---|---|---|
author | Stephen Adams <sra@google.com> | Wed Jan 12 00:07:54 2022 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 12 00:07:54 2022 +0000 |
tree | 236569a8c196598f50bbcc219c8e769a34ff3ad8 | |
parent | c9e3868afb19ab94ed1a17934360943c7f23adc2 [diff] |
[corelib] MapMixin improvements Change-Id: I623b9ee1903db7942232af4b1953868efeac6f5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227460 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Stephen Adams <sra@google.com>
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart index b8673b1..e4a9357 100644 --- a/sdk/lib/collection/maps.dart +++ b/sdk/lib/collection/maps.dart
@@ -125,9 +125,9 @@ } void addAll(Map<K, V> other) { - for (K key in other.keys) { - this[key] = other[key] as V; - } + other.forEach((K key, V value) { + this[key] = value; + }); } bool containsValue(Object? value) {