According to Leaf, Dart 2 type inference prefers to infer type
which is asked for, even if a more specific type can be inferred
from arguments.
It means that for
testIterable({"x": 1, "y": 1}.keys, ["x", "y"]);
where
testIterable(Iterable iterable, List expected, [int depth = 0])
the inferred type of map is Map<String, int>, but inferred type
of list is List (as testIterable argument type is List).
So this test is fixed by specifying type arguments of 'expected'
lists explicitly.
Change-Id: I2deab160038ee7abaad587920cb8fc620e09ebdf
Reviewed-on: https://dart-review.googlesource.com/39441
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Modified json_map_test to not expect the maps to be of type Map<int,
dynamic>, and marked iterable_to_list_test and iterable_to_set_test as
failing on DDC in the status files.
BUG=
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2996513002 .
2017-08-04 13:34:48 -07:00
Renamed from tests/corelib/iterable_to_list_test.dart (Browse further)