| Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| index 628c340c7848f7a473a69525538c683a65e7c74d..d6787516f05949c6217b0ce300563e99db1685a2 100644
|
| --- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| +++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| @@ -1944,16 +1944,6 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
| }
|
| }
|
|
|
| - DartType returnContext = InferenceContext.getContext(node);
|
| - DartType returnType;
|
| - if (returnContext is FutureUnionType) {
|
| - returnType = _resolver.isSubtypeOfFuture(fnType.returnType)
|
| - ? returnContext.futureOfType
|
| - : returnContext.type;
|
| - } else {
|
| - returnType = returnContext;
|
| - }
|
| -
|
| // Special case Future<T>.then upwards inference. It has signature:
|
| //
|
| // <S>(T -> (S | Future<S>)) -> Future<S>
|
| @@ -1991,8 +1981,8 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
| }
|
| }
|
| }
|
| - return ts.inferGenericFunctionCall(
|
| - _typeProvider, fnType, paramTypes, argTypes, returnType);
|
| + return ts.inferGenericFunctionCall(_typeProvider, fnType, paramTypes,
|
| + argTypes, InferenceContext.getContext(node));
|
| }
|
| return null;
|
| }
|
|
|