| Index: pkg/front_end/lib/src/fasta/type_inference/type_schema_elimination.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_elimination.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_elimination.dart
|
| index f9b856ffd59969aee32d910a8d1b5f3ede5b5ea0..0c96c24d49bf0691e3f661b68227972782dd4303 100644
|
| --- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_elimination.dart
|
| +++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_elimination.dart
|
| @@ -46,13 +46,10 @@ DartType leastClosure(CoreTypes coreTypes, DartType schema) =>
|
| class _TypeSchemaEliminationVisitor extends TypeSchemaVisitor<DartType> {
|
| final DartType nullType;
|
|
|
| - final DartType objectType;
|
| -
|
| bool isLeastClosure;
|
|
|
| _TypeSchemaEliminationVisitor(CoreTypes coreTypes, this.isLeastClosure)
|
| - : nullType = coreTypes.nullClass.rawType,
|
| - objectType = coreTypes.objectClass.rawType;
|
| + : nullType = coreTypes.nullClass.rawType;
|
|
|
| @override
|
| DartType visitFunctionType(FunctionType node) {
|
| @@ -112,7 +109,7 @@ class _TypeSchemaEliminationVisitor extends TypeSchemaVisitor<DartType> {
|
|
|
| @override
|
| DartType visitUnknownType(UnknownType node) =>
|
| - isLeastClosure ? nullType : objectType;
|
| + isLeastClosure ? nullType : const DynamicType();
|
|
|
| /// Runs an instance of the visitor on the given [schema] and returns the
|
| /// resulting type. If the schema contains no instances of `?`, the original
|
|
|