Skip to content

Commit d4fdb84

Browse files
pqCommit Queue
authored andcommitted
[element model] fix prefer_final_locals
Migrates `isPotentiallyMutatedInScope2` call. Bug: https://github.com/dart-lang/linter/issues/5099 Change-Id: I031d2133d492b42f8cb55ae0835f6de865e467d6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391845 Auto-Submit: Phil Quitslund <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 5447d07 commit d4fdb84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/linter/lib/src/rules/prefer_final_locals.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class _Visitor extends SimpleAstVisitor<void> {
5555

5656
bool isPotentiallyMutated(AstNode pattern, FunctionBody function) {
5757
if (pattern is DeclaredVariablePattern) {
58-
var element = pattern.declaredElement;
59-
if (element == null || function.isPotentiallyMutatedInScope(element)) {
58+
var element = pattern.declaredElement2;
59+
if (element == null || function.isPotentiallyMutatedInScope2(element)) {
6060
return true;
6161
}
6262
}

0 commit comments

Comments
 (0)