| Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| index 5405293e7a4473e9f769d8ad82d86d9e2959f9f0..8b00a44b72d537704702e1fb310a9c377c954d5f 100644
|
| --- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| +++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
| @@ -1676,6 +1676,24 @@ $downwards<int> g3(bool x) async {
|
| checkFile(build(downwards: "Future", upwards: "MyFuture"));
|
| }
|
|
|
| + void test_futureUnion_downwardsGenericMethods() {
|
| + // Regression test for https://github.com/dart-lang/sdk/issues/27134
|
| + //
|
| + // We need to take a future union into account for both directions of
|
| + // generic method inference.
|
| + checkFile(r'''
|
| +import 'dart:async';
|
| +
|
| +foo() async {
|
| + Future<List<A>> f1 = null;
|
| + Future<List<A>> f2 = null;
|
| + List<List<A>> merged = await Future.wait(/*info:INFERRED_TYPE_LITERAL*/[f1, f2]);
|
| +}
|
| +
|
| +class A {}
|
| + ''');
|
| + }
|
| +
|
| void test_futureUnion_downwards() {
|
| String build({String declared, String downwards, String upwards}) {
|
| // TODO(leafp): The use of matchTypes in visitInstanceCreationExpression
|
|
|