mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 20:51:50 +00:00
c567790306
This CL fixes two minor flaws in the type inference of closure return types: - inferReturnType needs to call _wrapAsyncOrGenerator prior to checking whether the inferred return type is a subtype of the context. This is necessary because for async and generator functions, the context type is the "wrapped" type (FutureOr<>, Iterable<>, or Stream<>). - _updateInferredReturnType needs to perform implicit downcasts before storing the inferred return type. This is necessary because if in implicit downcast is added, the inferred type that should be stored is the type that was downcast to. In order to make this work, the "unwrapping" logic needed to be moved from _updateInferredReturnType's two call sites into _updateInferredReturnType itself. These flaws were benign because they were masked by the looseness of the future flattening operation. They need to be fixed so that future flattening can be made more precise. Change-Id: I2b5ea3f63632638b5fadbce7d52c5d028acda5ab Reviewed-on: https://dart-review.googlesource.com/34480 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com> |
||
---|---|---|
build | ||
client | ||
docs | ||
pkg | ||
runtime | ||
samples | ||
samples-dev | ||
sdk | ||
tests | ||
third_party | ||
tools | ||
utils | ||
.clang-format | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.mailmap | ||
.packages | ||
AUTHORS | ||
BUILD.gn | ||
CHANGELOG.md | ||
codereview.settings | ||
DEPS | ||
LICENSE | ||
PATENTS | ||
PRESUBMIT.py | ||
README.dart-sdk | ||
README.md | ||
WATCHLISTS |
Dart
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Using Dart
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.
Building Dart
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.
Contributing to Dart
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.