| commit | 236aef873a3e5d2a00403207ab26b3829c86e47f | [log] [tgz] |
|---|---|---|
| author | Alexander Markov <alexmarkov@google.com> | Thu Feb 08 17:19:12 2018 |
| committer | commit-bot@chromium.org <commit-bot@chromium.org> | Thu Feb 08 17:19:12 2018 |
| tree | 053412b7626cc6c8107ff16343385bc7b0ede8b7 | |
| parent | be2e6c4f829df2ee772e6723da61f961e5331219 [diff] |
Update test corelib_2/iterable_to_list_test for Dart 2 type inference
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>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.