mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
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:
parent
d0649bd38c
commit
f70755d5e4
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue