@@ -9,12 +9,12 @@ import 'package:analyzer/dart/analysis/features.dart';
99import 'package:analyzer/dart/element/element.dart' ;
1010import 'package:analyzer/dart/element/nullability_suffix.dart' ;
1111import 'package:analyzer/dart/element/type.dart' ;
12- import 'package:analyzer/dart/element/type_provider.dart' ;
1312import 'package:analyzer/source/line_info.dart' ;
1413import 'package:analyzer/source/source.dart' ;
1514import 'package:analyzer/src/dart/analysis/session.dart' ;
1615import 'package:analyzer/src/dart/element/element.dart' ;
1716import 'package:analyzer/src/dart/element/type.dart' ;
17+ import 'package:analyzer/src/dart/element/type_provider.dart' ;
1818import 'package:analyzer/src/dart/element/type_schema.dart' ;
1919import 'package:analyzer/src/dart/element/type_system.dart' ;
2020import 'package:analyzer/src/generated/engine.dart' ;
@@ -23,99 +23,99 @@ import 'package:analyzer/src/summary2/reference.dart';
2323import 'package:test/test.dart' ;
2424
2525mixin ElementsTypesMixin {
26- InterfaceType get boolNone {
26+ InterfaceTypeImpl get boolNone {
2727 var element = typeProvider.boolElement;
2828 return interfaceTypeNone (element);
2929 }
3030
31- InterfaceType get boolQuestion {
31+ InterfaceTypeImpl get boolQuestion {
3232 var element = typeProvider.boolElement;
3333 return interfaceTypeQuestion (element);
3434 }
3535
36- InterfaceType get doubleNone {
36+ InterfaceTypeImpl get doubleNone {
3737 var element = typeProvider.doubleType.element;
3838 return interfaceTypeNone (element);
3939 }
4040
41- InterfaceType get doubleQuestion {
41+ InterfaceTypeImpl get doubleQuestion {
4242 var element = typeProvider.doubleType.element;
4343 return interfaceTypeQuestion (element);
4444 }
4545
46- DartType get dynamicType => DynamicTypeImpl .instance;
46+ TypeImpl get dynamicType => DynamicTypeImpl .instance;
4747
48- InterfaceType get functionNone {
48+ InterfaceTypeImpl get functionNone {
4949 var element = typeProvider.functionType.element;
5050 return interfaceTypeNone (element);
5151 }
5252
53- InterfaceType get functionQuestion {
53+ InterfaceTypeImpl get functionQuestion {
5454 var element = typeProvider.functionType.element;
5555 return interfaceTypeQuestion (element);
5656 }
5757
58- InterfaceType get intNone {
58+ InterfaceTypeImpl get intNone {
5959 var element = typeProvider.intType.element;
6060 return interfaceTypeNone (element);
6161 }
6262
63- InterfaceType get intQuestion {
63+ InterfaceTypeImpl get intQuestion {
6464 var element = typeProvider.intType.element;
6565 return interfaceTypeQuestion (element);
6666 }
6767
68- DartType get invalidType => InvalidTypeImpl .instance;
68+ TypeImpl get invalidType => InvalidTypeImpl .instance;
6969
7070 NeverTypeImpl get neverNone => NeverTypeImpl .instance;
7171
7272 NeverTypeImpl get neverQuestion => NeverTypeImpl .instanceNullable;
7373
7474 InterfaceTypeImpl get nullNone {
7575 var element = typeProvider.nullType.element;
76- return interfaceTypeNone (element) as InterfaceTypeImpl ;
76+ return interfaceTypeNone (element);
7777 }
7878
79- InterfaceType get numNone {
79+ InterfaceTypeImpl get numNone {
8080 var element = typeProvider.numType.element;
8181 return interfaceTypeNone (element);
8282 }
8383
84- InterfaceType get numQuestion {
84+ InterfaceTypeImpl get numQuestion {
8585 var element = typeProvider.numType.element;
8686 return interfaceTypeQuestion (element);
8787 }
8888
89- InterfaceType get objectNone {
89+ InterfaceTypeImpl get objectNone {
9090 var element = typeProvider.objectType.element;
9191 return interfaceTypeNone (element);
9292 }
9393
94- InterfaceType get objectQuestion {
94+ InterfaceTypeImpl get objectQuestion {
9595 var element = typeProvider.objectType.element;
9696 return interfaceTypeQuestion (element);
9797 }
9898
99- InterfaceType get recordNone {
99+ InterfaceTypeImpl get recordNone {
100100 var element = typeProvider.recordElement;
101101 return interfaceTypeNone (element);
102102 }
103103
104- InterfaceType get stringNone {
104+ InterfaceTypeImpl get stringNone {
105105 var element = typeProvider.stringType.element;
106106 return interfaceTypeNone (element);
107107 }
108108
109- InterfaceType get stringQuestion {
109+ InterfaceTypeImpl get stringQuestion {
110110 var element = typeProvider.stringType.element;
111111 return interfaceTypeQuestion (element);
112112 }
113113
114114 LibraryElementImpl get testLibrary => throw UnimplementedError ();
115115
116- TypeProvider get typeProvider;
116+ TypeProviderImpl get typeProvider;
117117
118- DartType get unknownInferredType => UnknownInferredType .instance;
118+ TypeImpl get unknownInferredType => UnknownInferredType .instance;
119119
120120 VoidTypeImpl get voidNone => VoidTypeImpl .instance;
121121
@@ -149,7 +149,7 @@ mixin ElementsTypesMixin {
149149 return fragment;
150150 }
151151
152- InterfaceType comparableNone (DartType type) {
152+ InterfaceTypeImpl comparableNone (DartType type) {
153153 var coreLibrary = typeProvider.intElement.library;
154154 var element = coreLibrary.getClass ('Comparable' )! ;
155155 return element.instantiate (
@@ -158,7 +158,7 @@ mixin ElementsTypesMixin {
158158 );
159159 }
160160
161- InterfaceType comparableQuestion (DartType type) {
161+ InterfaceTypeImpl comparableQuestion (DartType type) {
162162 var coreLibrary = typeProvider.intElement.library;
163163 var element = coreLibrary.getClass ('Comparable' )! ;
164164 return element.instantiate (
@@ -271,32 +271,32 @@ mixin ElementsTypesMixin {
271271 return typeProvider.futureElement.instantiate (
272272 typeArguments: [type],
273273 nullabilitySuffix: NullabilitySuffix .none,
274- ) as InterfaceTypeImpl ;
274+ );
275275 }
276276
277277 InterfaceTypeImpl futureOrNone (DartType type) {
278278 return typeProvider.futureOrElement.instantiate (
279279 typeArguments: [type],
280280 nullabilitySuffix: NullabilitySuffix .none,
281- ) as InterfaceTypeImpl ;
281+ );
282282 }
283283
284284 InterfaceTypeImpl futureOrQuestion (DartType type) {
285285 return typeProvider.futureOrElement.instantiate (
286286 typeArguments: [type],
287287 nullabilitySuffix: NullabilitySuffix .question,
288- ) as InterfaceTypeImpl ;
288+ );
289289 }
290290
291291 InterfaceTypeImpl futureQuestion (DartType type) {
292292 return typeProvider.futureElement.instantiate (
293293 typeArguments: [type],
294294 nullabilitySuffix: NullabilitySuffix .question,
295- ) as InterfaceTypeImpl ;
295+ );
296296 }
297297
298- InterfaceType interfaceType (
299- InterfaceElement element, {
298+ InterfaceTypeImpl interfaceType (
299+ InterfaceElementImpl element, {
300300 List <DartType > typeArguments = const [],
301301 required NullabilitySuffix nullabilitySuffix,
302302 }) {
@@ -306,8 +306,8 @@ mixin ElementsTypesMixin {
306306 );
307307 }
308308
309- InterfaceType interfaceTypeNone (
310- InterfaceElement element, {
309+ InterfaceTypeImpl interfaceTypeNone (
310+ InterfaceElementImpl element, {
311311 List <DartType > typeArguments = const [],
312312 }) {
313313 return element.instantiate (
@@ -316,8 +316,8 @@ mixin ElementsTypesMixin {
316316 );
317317 }
318318
319- InterfaceType interfaceTypeQuestion (
320- InterfaceElement element, {
319+ InterfaceTypeImpl interfaceTypeQuestion (
320+ InterfaceElementImpl element, {
321321 List <DartType > typeArguments = const [],
322322 }) {
323323 return element.instantiate (
@@ -326,14 +326,14 @@ mixin ElementsTypesMixin {
326326 );
327327 }
328328
329- InterfaceType iterableNone (DartType type) {
329+ InterfaceTypeImpl iterableNone (DartType type) {
330330 return typeProvider.iterableElement.instantiate (
331331 typeArguments: [type],
332332 nullabilitySuffix: NullabilitySuffix .none,
333333 );
334334 }
335335
336- InterfaceType iterableQuestion (DartType type) {
336+ InterfaceTypeImpl iterableQuestion (DartType type) {
337337 return typeProvider.iterableElement.instantiate (
338338 typeArguments: [type],
339339 nullabilitySuffix: NullabilitySuffix .question,
@@ -371,28 +371,28 @@ mixin ElementsTypesMixin {
371371 return library;
372372 }
373373
374- InterfaceType listNone (DartType type) {
374+ InterfaceTypeImpl listNone (DartType type) {
375375 return typeProvider.listElement.instantiate (
376376 typeArguments: [type],
377377 nullabilitySuffix: NullabilitySuffix .none,
378378 );
379379 }
380380
381- InterfaceType listQuestion (DartType type) {
381+ InterfaceTypeImpl listQuestion (DartType type) {
382382 return typeProvider.listElement.instantiate (
383383 typeArguments: [type],
384384 nullabilitySuffix: NullabilitySuffix .question,
385385 );
386386 }
387387
388- InterfaceType mapNone (DartType key, DartType value) {
388+ InterfaceTypeImpl mapNone (DartType key, DartType value) {
389389 return typeProvider.mapElement.instantiate (
390390 typeArguments: [key, value],
391391 nullabilitySuffix: NullabilitySuffix .none,
392392 );
393393 }
394394
395- InterfaceType mapQuestion (DartType key, DartType value) {
395+ InterfaceTypeImpl mapQuestion (DartType key, DartType value) {
396396 return typeProvider.mapElement.instantiate (
397397 typeArguments: [key, value],
398398 nullabilitySuffix: NullabilitySuffix .question,
@@ -451,7 +451,7 @@ mixin ElementsTypesMixin {
451451 return parameter;
452452 }
453453
454- ParameterElement namedRequiredParameter ({
454+ ParameterElementImpl namedRequiredParameter ({
455455 required String name,
456456 required DartType type,
457457 bool isCovariant = false ,
@@ -590,8 +590,8 @@ mixin ElementsTypesMixin {
590590 return fragment;
591591 }
592592
593- DartType typeAliasTypeNone (
594- TypeAliasElement element, {
593+ TypeImpl typeAliasTypeNone (
594+ TypeAliasElementImpl element, {
595595 List <DartType > typeArguments = const [],
596596 }) {
597597 return element.instantiate (
0 commit comments