Strong mode fixes for hash_map2_test.dart

The maps used by this test have a reified type argument of `dynamic`,
so the callbacks we pass to `any` and `every` need to be typed
accordingly.

Change-Id: Idd00478cc7667560ad81167db8d4816c8a7fff8d
Reviewed-on: https://dart-review.googlesource.com/19450
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2017-11-09 20:24:12 +00:00 committed by commit-bot@chromium.org
parent d0649bd38c
commit f70755d5e4

View file

@ -20,8 +20,8 @@ testMap(Map newMap(), Map newMapFrom(Map map)) {
return map;
}
bool odd(int n) => (n & 1) == 1;
bool even(int n) => (n & 1) == 0;
bool odd(Object n) => ((n as int) & 1) == 1;
bool even(Object n) => ((n as int) & 1) == 0;
void addAll(Map toMap, Map fromMap) {
fromMap.forEach((k, v) {
toMap[k] = v;