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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java

Issue 49383003: Issue 14358. Check for assignment in any close. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java
index 8e069df4f4a06488d986e42a956bda1c8c9e383c..79c6352ecb25c92e3a14c4d915b510110fbe22c3 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java
@@ -29,7 +29,12 @@ public class ParameterElementImpl extends VariableElementImpl implements Paramet
/**
* Is {@code true} if this variable is potentially mutated somewhere in its scope.
*/
- private boolean isPotentiallyMutated;
+ private boolean isPotentiallyMutatedInScope;
+
+ /**
+ * Is {@code true} if this variable is potentially mutated somewhere in closure.
+ */
+ private boolean isPotentiallyMutatedInClosure;
/**
* An array containing all of the parameters defined by this parameter element. There will only be
@@ -131,15 +136,27 @@ public class ParameterElementImpl extends VariableElementImpl implements Paramet
}
@Override
- public boolean isPotentiallyMutated() {
- return isPotentiallyMutated;
+ public boolean isPotentiallyMutatedInClosure() {
+ return isPotentiallyMutatedInClosure;
+ }
+
+ @Override
+ public boolean isPotentiallyMutatedInScope() {
+ return isPotentiallyMutatedInScope;
}
/**
* Specifies that this variable is potentially mutated somewhere in its scope.
*/
public void markPotentiallyMutated() {
Brian Wilkerson 2013/10/29 19:34:06 nit: add "InScope" to name.
- isPotentiallyMutated = true;
+ isPotentiallyMutatedInScope = true;
+ }
+
+ /**
+ * Specifies that this variable is potentially mutated somewhere in closure.
+ */
+ public void markPotentiallyMutatedInClosure() {
+ isPotentiallyMutatedInClosure = true;
}
/**

Powered by Google App Engine
This is Rietveld 408576698