Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1711433002: Deprecate old "isPotentiallyMutated..." API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index e90e739666c0ef08f490f31f6c1df82ccf1d309a..8ef82c03b3b896e8145be51b9a14faf42b988075 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -12620,29 +12620,11 @@ class VariableResolverVisitor extends ScopedVisitor {
}
// Must be local or parameter.
ElementKind kind = element.kind;
- if (kind == ElementKind.LOCAL_VARIABLE) {
+ if (kind == ElementKind.LOCAL_VARIABLE || kind == ElementKind.PARAMETER) {
node.staticElement = element;
- LocalVariableElementImpl variableImpl =
- element as LocalVariableElementImpl;
if (node.inSetterContext()) {
- variableImpl.markPotentiallyMutatedInScope();
_localVariableInfo.potentiallyMutatedInScope.add(element);
if (element.enclosingElement != _enclosingFunction) {
- variableImpl.markPotentiallyMutatedInClosure();
- _localVariableInfo.potentiallyMutatedInClosure.add(element);
- }
- }
- } else if (kind == ElementKind.PARAMETER) {
- node.staticElement = element;
- if (node.inSetterContext()) {
- ParameterElementImpl parameterImpl = element as ParameterElementImpl;
- parameterImpl.markPotentiallyMutatedInScope();
- _localVariableInfo.potentiallyMutatedInScope.add(element);
- // If we are in some closure, check if it is not the same as where
- // variable is declared.
- if (_enclosingFunction != null &&
- (element.enclosingElement != _enclosingFunction)) {
- parameterImpl.markPotentiallyMutatedInClosure();
_localVariableInfo.potentiallyMutatedInClosure.add(element);
}
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698