@@ -6255,7 +6255,6 @@ class ToDoFinder {
62556255class TypeNameResolver {
62566256 final TypeSystem typeSystem;
62576257 final DartType dynamicType;
6258- final DartType undefinedType;
62596258 final bool isNonNullableUnit;
62606259 final AnalysisOptionsImpl analysisOptions;
62616260 final LibraryElement definingLibrary;
@@ -6280,7 +6279,6 @@ class TypeNameResolver {
62806279 this .errorListener,
62816280 {this .shouldUseWithClauseInferredTypes: true })
62826281 : dynamicType = typeProvider.dynamicType,
6283- undefinedType = typeProvider.undefinedType,
62846282 analysisOptions = definingLibrary.context.analysisOptions;
62856283
62866284 /// Report an error with the given error code and arguments.
@@ -6322,8 +6320,8 @@ class TypeNameResolver {
63226320 return ;
63236321 }
63246322 if (nameScope.shouldIgnoreUndefined (typeName)) {
6325- typeName.staticType = undefinedType ;
6326- node.type = undefinedType ;
6323+ typeName.staticType = dynamicType ;
6324+ node.type = dynamicType ;
63276325 return ;
63286326 }
63296327 //
@@ -6343,8 +6341,8 @@ class TypeNameResolver {
63436341 element = nameScope.lookup (prefix, definingLibrary);
63446342 if (element is PrefixElement ) {
63456343 if (nameScope.shouldIgnoreUndefined (typeName)) {
6346- typeName.staticType = undefinedType ;
6347- node.type = undefinedType ;
6344+ typeName.staticType = dynamicType ;
6345+ node.type = dynamicType ;
63486346 return ;
63496347 }
63506348 AstNode grandParent = parent.parent;
@@ -6382,8 +6380,8 @@ class TypeNameResolver {
63826380 }
63836381 }
63846382 if (nameScope.shouldIgnoreUndefined (typeName)) {
6385- typeName.staticType = undefinedType ;
6386- node.type = undefinedType ;
6383+ typeName.staticType = dynamicType ;
6384+ node.type = dynamicType ;
63876385 return ;
63886386 }
63896387 }
@@ -6500,8 +6498,8 @@ class TypeNameResolver {
65006498 if (element is MultiplyDefinedElement ) {
65016499 _setElement (typeName, element);
65026500 }
6503- typeName.staticType = undefinedType ;
6504- node.type = undefinedType ;
6501+ typeName.staticType = dynamicType ;
6502+ node.type = dynamicType ;
65056503 return ;
65066504 }
65076505
@@ -6674,7 +6672,7 @@ class TypeNameResolver {
66746672 DartType _getType (TypeAnnotation annotation) {
66756673 DartType type = annotation.type;
66766674 if (type == null ) {
6677- return undefinedType ;
6675+ return dynamicType ;
66786676 }
66796677 return type;
66806678 }
@@ -7231,9 +7229,6 @@ abstract class TypeProvider {
72317229 /// Return the type representing the built-in type 'Type'.
72327230 InterfaceType get typeType;
72337231
7234- /// Return the type representing typenames that can't be resolved.
7235- DartType get undefinedType;
7236-
72377232 /// Return 'true' if [id] is the name of a getter on
72387233 /// the Object type.
72397234 bool isObjectGetter (String id);
@@ -7372,9 +7367,6 @@ class TypeProviderImpl extends TypeProviderBase {
73727367 /// The type representing the built-in type 'Type'.
73737368 InterfaceType _typeType;
73747369
7375- /// The type representing typenames that can't be resolved.
7376- DartType _undefinedType;
7377-
73787370 /// Initialize a newly created type provider to provide the types defined in
73797371 /// the given [coreLibrary] and [asyncLibrary] .
73807372 TypeProviderImpl (LibraryElement coreLibrary, LibraryElement asyncLibrary) {
@@ -7476,9 +7468,6 @@ class TypeProviderImpl extends TypeProviderBase {
74767468 @override
74777469 InterfaceType get typeType => _typeType;
74787470
7479- @override
7480- DartType get undefinedType => _undefinedType;
7481-
74827471 InterfaceType _createNever (Namespace namespace) {
74837472 // TODO(brianwilkerson) Remove this method when the class is defined in the
74847473 // SDK.
@@ -7533,7 +7522,6 @@ class TypeProviderImpl extends TypeProviderBase {
75337522 _stringType = _getType (coreNamespace, 'String' );
75347523 _symbolType = _getType (coreNamespace, 'Symbol' );
75357524 _typeType = _getType (coreNamespace, 'Type' );
7536- _undefinedType = UndefinedTypeImpl .instance;
75377525 _futureDynamicType = _futureType.instantiate (< DartType > [_dynamicType]);
75387526 _futureNullType = _futureType.instantiate (< DartType > [_nullType]);
75397527 _iterableDynamicType = _iterableType.instantiate (< DartType > [_dynamicType]);
@@ -7587,9 +7575,6 @@ class TypeResolverVisitor extends ScopedVisitor {
75877575 /// The type representing the type 'dynamic'.
75887576 DartType _dynamicType;
75897577
7590- /// The type representing typenames that can't be resolved.
7591- DartType _undefinedType;
7592-
75937578 /// The flag specifying if currently visited class references 'super'
75947579 /// expression.
75957580 bool _hasReferenceToSuper = false ;
@@ -7645,7 +7630,6 @@ class TypeResolverVisitor extends ScopedVisitor {
76457630 : super (definingLibrary, source, typeProvider, errorListener,
76467631 nameScope: nameScope) {
76477632 _dynamicType = typeProvider.dynamicType;
7648- _undefinedType = typeProvider.undefinedType;
76497633 _typeSystem = TypeSystem .create (definingLibrary.context);
76507634 _typeNameResolver = new TypeNameResolver (_typeSystem, typeProvider,
76517635 isNonNullableUnit, definingLibrary, source, errorListener,
0 commit comments