S13_A15_T4.js (858B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: "''arguments'' variable overrides ActivationObject.arguments" 6 es5id: 13_A15_T4 7 description: > 8 Declaring a variable named with "arguments" and following a 9 "return" statement within a function body 10 flags: [noStrict] 11 ---*/ 12 13 THE_ANSWER="Answer to Life, the Universe, and Everything"; 14 15 function __func(){ 16 return typeof arguments; 17 var arguments = THE_ANSWER; 18 }; 19 20 ////////////////////////////////////////////////////////////////////////////// 21 //CHECK#1 22 if (__func(42,42,42) !== "object") { 23 throw new Test262Error('#1: __func(42,42,42) === "object". Actual: __func(42,42,42)==='+__func(42,42,42)); 24 } 25 // 26 ////////////////////////////////////////////////////////////////////////////// 27 28 reportCompare(0, 0);