Skip to content

Commit

Permalink
analyzer: Remove new and unused strictCasts field from LinterContextImpl
Browse files Browse the repository at this point in the history
Change-Id: I97ada794a8ea7c1c2b72bdaece2d4e5825d28de9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344200
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
  • Loading branch information
srawlins authored and Commit Queue committed Jan 2, 2024
1 parent 3da0eaf commit c65fa57
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/analyzer/lib/src/lint/linter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
import 'package:analyzer/src/dart/element/type_system.dart';
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/generated/engine.dart'
show
AnalysisErrorInfo,
AnalysisErrorInfoImpl,
AnalysisOptions,
AnalysisOptionsImpl;
show AnalysisErrorInfo, AnalysisErrorInfoImpl, AnalysisOptions;
import 'package:analyzer/src/generated/resolver.dart' show ScopeResolverVisitor;
import 'package:analyzer/src/lint/analysis.dart';
import 'package:analyzer/src/lint/io.dart';
Expand Down Expand Up @@ -314,11 +310,6 @@ class LinterContextImpl implements LinterContext {
'`currentUnit.unit.declaredElement?.session`.')
DeclaredVariables get declaredVariables => _declaredVariables;

bool get strictCasts =>
// TODO(pq): update when there's a better API to access strictCasts.
// ignore: deprecated_member_use_from_same_package
(analysisOptions as AnalysisOptionsImpl).strictCasts;

@override
bool canBeConst(Expression expression) {
if (expression is InstanceCreationExpressionImpl) {
Expand Down

0 comments on commit c65fa57

Please sign in to comment.