blob: 5b6723f746a2d1692175a2b8e56b508a48ef5b44 [file] [log] [blame] [edit]
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
template: default
desc: Binding as specified via property name, identifier, and initializer
info: |
13.3.3.7 Runtime Semantics: KeyedBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
[...]
8. Return InitializeReferencedBinding(lhs, v).
---*/
//- elems
{ x: y = 33 }
//- vals
{ }
//- body
assert.sameValue(y, 33);
assert.throws(ReferenceError, function() {
x;
});