aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Chris Parsons <cparsons@google.com>2016-08-10 21:20:38 +0000
committerGravatar Yue Gan <yueg@google.com>2016-08-11 09:15:48 +0000
commite41857b2e3bd279e3b00a7137b750afd0bc16868 (patch)
tree520d48d0d4eaf0c16d13de8e35351ba0f76057dc /src/main
parent95bbe9c4ceafae7bd3fdd08169b5891d6849f3f9 (diff)
*** Reason for rollback *** Breaks release. *** *** Original change description *** Fix Environment.Continuation's tracking of global variables RELNOTES[INC]: Skylark: It is an error to shadow a global variable with a local variable after the global has already been accessed in the function. -- MOS_MIGRATED_REVID=129910501
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/Environment.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/Environment.java b/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
index ec504a06ec..2aab8811b2 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/Environment.java
@@ -222,14 +222,12 @@ public final class Environment implements Freezable {
FuncallExpression caller,
Frame lexicalFrame,
Frame globalFrame,
- Set<String> knownGlobalVariables,
boolean isSkylark) {
this.continuation = continuation;
this.function = function;
this.caller = caller;
this.lexicalFrame = lexicalFrame;
this.globalFrame = globalFrame;
- this.knownGlobalVariables = knownGlobalVariables;
this.isSkylark = isSkylark;
}
}
@@ -371,8 +369,7 @@ public final class Environment implements Freezable {
*/
void enterScope(BaseFunction function, FuncallExpression caller, Frame globals) {
continuation =
- new Continuation(continuation, function, caller, lexicalFrame, globalFrame,
- knownGlobalVariables, isSkylark);
+ new Continuation(continuation, function, caller, lexicalFrame, globalFrame, isSkylark);
lexicalFrame = new Frame(mutability(), null);
globalFrame = globals;
knownGlobalVariables = new HashSet<>();