commit | d4fdb846d6824cfd6b678ad33ec31dffcd24f66c | [log] [tgz] |
---|---|---|
author | pq <pquitslund@google.com> | Fri Oct 25 14:52:13 2024 +0000 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Oct 25 14:52:13 2024 +0000 |
tree | c58c413c581897c749b0bca20945028691a7c040 | |
parent | 5447d07917a7b43be0e9f91ac9a0afc138fd0acb [diff] |
[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 <pquitslund@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/linter/lib/src/rules/prefer_final_locals.dart b/pkg/linter/lib/src/rules/prefer_final_locals.dart index 6319ebc..3c2bdee 100644 --- a/pkg/linter/lib/src/rules/prefer_final_locals.dart +++ b/pkg/linter/lib/src/rules/prefer_final_locals.dart
@@ -55,8 +55,8 @@ bool isPotentiallyMutated(AstNode pattern, FunctionBody function) { if (pattern is DeclaredVariablePattern) { - var element = pattern.declaredElement; - if (element == null || function.isPotentiallyMutatedInScope(element)) { + var element = pattern.declaredElement2; + if (element == null || function.isPotentiallyMutatedInScope2(element)) { return true; } }