| Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| index a2f1cb786f49a993e4fdd8ccefcee47da286a3f5..863ebfbdf83e3fd281a2dbca4b1a089a0b665e70 100644
|
| --- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
|
| @@ -436,6 +436,16 @@ abstract class TypeInferrerImpl extends TypeInferrer {
|
| /// the statement type and calls the appropriate specialized "infer" method.
|
| void inferStatement(Statement statement);
|
|
|
| + DartType wrapFutureOrType(DartType type) {
|
| + if (type is InterfaceType &&
|
| + identical(type.classNode, coreTypes.futureOrClass)) {
|
| + return type;
|
| + }
|
| + // TODO(paulberry): If [type] is a subtype of `Future`, should we just
|
| + // return it unmodified?
|
| + return new InterfaceType(coreTypes.futureOrClass, <DartType>[type]);
|
| + }
|
| +
|
| DartType wrapFutureType(DartType type) {
|
| var typeWithoutFutureOr = type ?? const DynamicType();
|
| if (type is InterfaceType &&
|
|
|