blob: 4c0bd0aa568186c0d3345de742fcd9df4ca6b207 [file] [edit]
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// Copyright (C) 2018 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
Modifications to default binding that occur after dependency has been
evaluated are reflected in local binding
info: |
GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
a. Let M and N2 be the indirection values provided when this binding for
N was created.
b. Let targetEnv be M.[[Environment]].
c. If targetEnv is undefined, throw a ReferenceError exception.
d. Let targetER be targetEnv's EnvironmentRecord.
e. Return ? targetER.GetBindingValue(N2, S).
template: default
---*/
//- import
import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js')
//- body
assert.sameValue(imported.default(), 1);
assert.sameValue(imported.default, 2);