2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 Modifications to named bindings that occur after dependency has been
7 evaluated are reflected in local binding
8 esid: sec-moduleevaluation
10 8.1.1.5.1 GetBindingValue (N, S)
13 3. If the binding for N is an indirect binding, then
14 a. Let M and N2 be the indirection values provided when this binding for
16 b. Let targetEnv be M.[[Environment]].
17 c. If targetEnv is undefined, throw a ReferenceError exception.
18 d. Let targetER be targetEnv's EnvironmentRecord.
19 e. Return ? targetER.GetBindingValue(N2, S).
20 includes: [fnGlobalObject.js]
24 import { x } from './eval-gtbndng-indirect-update_FIXTURE.js';
26 assert.sameValue(x, 1);
28 // This function is exposed on the global scope (instead of as an exported
29 // binding) in order to avoid possible false positives from assuming correct
30 // behavior of the semantics under test.
31 fnGlobalObject().test262update();
33 assert.sameValue(x, 2);