binding-resolution.js (727B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-variable-statement-runtime-semantics-evaluation 5 es6id: 13.3.2.4 6 description: Binding is resolve prior to evaluation of Initializer 7 info: | 8 VariableDeclaration : BindingIdentifier Initializer 9 10 1. Let bindingId be StringValue of BindingIdentifier. 11 2. Let lhs be ? ResolveBinding(bindingId). 12 3. Let rhs be the result of evaluating Initializer. 13 [...] 14 flags: [noStrict] 15 ---*/ 16 17 var obj = { test262id: 1 }; 18 19 with (obj) { 20 var test262id = delete obj.test262id; 21 } 22 23 assert.sameValue(obj.test262id, true); 24 assert.sameValue(test262id, undefined); 25 26 reportCompare(0, 0);