| 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 2539c8d934033bbc8e7ca2e54f8dd6bd2851458e..c026952fad1fc24cceffbb56dab6e140f93f1e35 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
|
| @@ -192,6 +192,12 @@ abstract class TypeInferrerImpl extends TypeInferrer {
|
| /// inside a closure.
|
| ClosureContext closureContext;
|
|
|
| + /// When performing top level inference, this boolean is set to `false` if we
|
| + /// discover that the type of the object is not immediately evident.
|
| + ///
|
| + /// Not used when performing local inference.
|
| + bool isImmediatelyEvident = true;
|
| +
|
| TypeInferrerImpl(
|
| TypeInferenceEngineImpl engine, this.uri, this.listener, bool topLevel)
|
| : coreTypes = engine.coreTypes,
|
| @@ -451,6 +457,12 @@ abstract class TypeInferrerImpl extends TypeInferrer {
|
| /// the statement type and calls the appropriate specialized "infer" method.
|
| void inferStatement(Statement statement);
|
|
|
| + void recordNotImmediatelyEvident(int fileOffset) {
|
| + assert(isTopLevel);
|
| + isImmediatelyEvident = false;
|
| + // TODO(paulberry): report an error.
|
| + }
|
| +
|
| DartType wrapFutureOrType(DartType type) {
|
| if (type is InterfaceType &&
|
| identical(type.classNode, coreTypes.futureOrClass)) {
|
|
|