11.4.1-5-2.js (575B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-delete-operator-runtime-semantics-evaluation 6 description: > 7 delete operator returns false when deleting a direct reference to 8 a function argument 9 flags: [noStrict] 10 ---*/ 11 12 function foo(a, b) { 13 // Now, deleting 'a' directly should fail 14 // because 'a' is direct reference to a function argument; 15 var d = delete a; 16 return d === false && a === 1; 17 } 18 19 assert(foo(1, 2), 'foo(1,2) !== true'); 20 21 reportCompare(0, 0);