Files
sdk/pkg/vm/lib/transformations
Alexander Markov 47eff41aa0 [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>
2021-04-26 10:28:47 +00:00
..
2021-04-15 10:16:27 +00:00
2021-04-15 10:16:27 +00:00
2021-04-15 10:16:27 +00:00