Environment: introduce method for more specific lookups
Callers should know in which frame a value is defined. This is needed for
static name resolution. It avoids extra lookups and will allow other
performance improvements.
https://github.com/bazelbuild/bazel/issues/5637
RELNOTES: None.
PiperOrigin-RevId: 210762449
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
index 64ebe3e..6159374 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
@@ -1813,7 +1813,7 @@
public void testShadowisNotInitialized() throws Exception {
new SkylarkTest("--incompatible_static_name_resolution=true")
.testIfErrorContains(
- /* error message */ "name 'gl' is not defined",
+ /* error message */ "local variable 'gl' is referenced before assignment",
"gl = 5",
"def foo():", // returns the value before the first even number
" if False: gl = 2",