commit | 47eff41aa0353718357007428957510b8bc8a2b3 | [log] [tgz] |
---|---|---|
author | Alexander Markov <alexmarkov@google.com> | Mon Apr 26 10:28:47 2021 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon Apr 26 10:28:47 2021 +0000 |
tree | fc36a5d858f6bb8cc338efd00dd095231f5cf21e | |
parent | 417e3ef225ba6562522f76b4834ba07db452b3b2 [diff] |
[vm/aot/tfa] Handle classes which implement Future along with another generic type in a cast to FutureOr When handling a type check to FutureOr in TFA, there is a case when a ConcreteType is a subtype of Future. In such case, it was assumed that ConcreteType has only 1 type argument. This is not true if class extends/implements/mixes-in Future along with another generic class. This change adds the logic to query offset of Future type arguments in the type arguments of a class and also check if the type argument is known. TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter81068.dart Fixes https://github.com/flutter/flutter/issues/81068 Change-Id: I970e649823bafec433fc21a286498acc0126b331 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196546 Auto-Submit: Alexander Markov <alexmarkov@google.com> Commit-Queue: Aske Simon Christensen <askesc@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Aske Simon Christensen <askesc@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
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.