Skip to content

Commit ad6cd13

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer: Remove isNonNullableByDefault from InstanceMemberInferrer
Also typeSystem, which is unused. Change-Id: I6f02429744a5770289a56d7a2faf5a0e1a4ebe22 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399882 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 8f77b2e commit ad6cd13

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

pkg/analyzer/lib/src/summary2/instance_member_inferrer.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:analyzer/src/dart/element/element.dart';
99
import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
1010
import 'package:analyzer/src/dart/element/type.dart';
1111
import 'package:analyzer/src/dart/element/type_algebra.dart';
12-
import 'package:analyzer/src/dart/element/type_system.dart';
1312
import 'package:analyzer/src/error/inference_error.dart';
1413
import 'package:analyzer/src/util/collection.dart';
1514
import '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

Comments
 (0)