@@ -9,7 +9,6 @@ import 'package:analyzer/src/dart/element/element.dart';
99import 'package:analyzer/src/dart/element/inheritance_manager3.dart' ;
1010import 'package:analyzer/src/dart/element/type.dart' ;
1111import 'package:analyzer/src/dart/element/type_algebra.dart' ;
12- import 'package:analyzer/src/dart/element/type_system.dart' ;
1312import 'package:analyzer/src/error/inference_error.dart' ;
1413import 'package:analyzer/src/util/collection.dart' ;
1514import 'package:collection/collection.dart' ;
@@ -20,20 +19,14 @@ class InstanceMemberInferrer {
2019 final InheritanceManager3 inheritance;
2120 final Set <InterfaceElement > elementsBeingInferred = {};
2221
23- late TypeSystemImpl typeSystem;
24- late bool isNonNullableByDefault;
2522 late InterfaceElement currentInterfaceElement;
2623
2724 /// Initialize a newly create inferrer.
2825 InstanceMemberInferrer (this .inheritance);
2926
30- DartType get _dynamicType => DynamicTypeImpl .instance;
31-
3227 /// Infer type information for all of the instance members in the given
3328 /// compilation [unit] .
3429 void inferCompilationUnit (CompilationUnitElementImpl unit) {
35- typeSystem = unit.library.typeSystem;
36- isNonNullableByDefault = true ;
3730 _inferClasses (unit.classes);
3831 _inferClasses (unit.enums);
3932 _inferExtensionTypes (unit.extensionTypes);
@@ -610,10 +603,6 @@ class InstanceMemberInferrer {
610603 }
611604 }
612605
613- // Reset the type.
614- if (! isNonNullableByDefault) {
615- parameter.type = _dynamicType;
616- }
617606 element.isOperatorEqualWithParameterTypeFromObject = true ;
618607 }
619608
0 commit comments