CQ. Remove unused InheritanceOverrideVerifier(strictCasts)

Change-Id: I5efbce7edfecfa6a77592542e29495dcff51a589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2024-06-28 21:46:38 +00:00 committed by Commit Queue
parent aa8ea803cf
commit 3867c8d945
2 changed files with 9 additions and 15 deletions

View file

@ -417,10 +417,11 @@ class LibraryAnalyzer {
//
// Compute inheritance and override errors.
//
var inheritanceOverrideVerifier = InheritanceOverrideVerifier(
_typeSystem, _inheritance, errorReporter,
strictCasts: _analysisOptions.strictCasts);
inheritanceOverrideVerifier.verifyUnit(unit);
InheritanceOverrideVerifier(
_typeSystem,
_inheritance,
errorReporter,
).verifyUnit(unit);
//
// Use the ErrorVerifier to compute errors.

View file

@ -28,13 +28,12 @@ class InheritanceOverrideVerifier {
final TypeProvider _typeProvider;
final InheritanceManager3 _inheritance;
final ErrorReporter _reporter;
final bool _strictCasts;
InheritanceOverrideVerifier(
this._typeSystem, this._inheritance, this._reporter,
{required bool strictCasts})
: _typeProvider = _typeSystem.typeProvider,
_strictCasts = strictCasts;
this._typeSystem,
this._inheritance,
this._reporter,
) : _typeProvider = _typeSystem.typeProvider;
void verifyUnit(CompilationUnit unit) {
var library = unit.declaredElement!.library as LibraryElementImpl;
@ -51,7 +50,6 @@ class InheritanceOverrideVerifier {
library: library,
classNameToken: declaration.name,
classElement: element,
strictCasts: _strictCasts,
implementsClause: declaration.implementsClause,
members: declaration.members,
superclass: declaration.extendsClause?.superclass,
@ -72,7 +70,6 @@ class InheritanceOverrideVerifier {
library: library,
classNameToken: declaration.name,
classElement: element,
strictCasts: _strictCasts,
implementsClause: declaration.implementsClause,
superclass: declaration.superclass,
withClause: declaration.withClause,
@ -92,7 +89,6 @@ class InheritanceOverrideVerifier {
library: library,
classNameToken: declaration.name,
classElement: element,
strictCasts: _strictCasts,
implementsClause: declaration.implementsClause,
members: declaration.members,
withClause: declaration.withClause,
@ -112,7 +108,6 @@ class InheritanceOverrideVerifier {
library: library,
classNameToken: declaration.name,
classElement: element,
strictCasts: _strictCasts,
implementsClause: declaration.implementsClause,
members: declaration.members,
onClause: declaration.onClause,
@ -158,7 +153,6 @@ class _ClassVerifier {
final LibraryElementImpl library;
final Uri libraryUri;
final InterfaceElement classElement;
final bool strictCasts;
final Token classNameToken;
final List<ClassMember> members;
@ -181,7 +175,6 @@ class _ClassVerifier {
required this.library,
required this.classNameToken,
required this.classElement,
required this.strictCasts,
this.implementsClause,
this.members = const [],
this.onClause,