S13_A15_T5.js (1074B)
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_T5 7 description: Creating a variable named with "arguments" without a function 8 flags: [noStrict] 9 ---*/ 10 11 THE_ANSWER="Answer to Life, the Universe, and Everything"; 12 13 var arguments = THE_ANSWER; 14 15 function __func(){ 16 return arguments; 17 }; 18 19 ////////////////////////////////////////////////////////////////////////////// 20 //CHECK#1 21 if ( __func() === THE_ANSWER) { 22 throw new Test262Error('#1: __func() !== THE_ANSWER'); 23 } 24 // 25 ////////////////////////////////////////////////////////////////////////////// 26 27 ////////////////////////////////////////////////////////////////////////////// 28 //CHECK#2 29 if (__func("The Ultimate Question") === "The Ultimate Question") { 30 throw new Test262Error('#2: __func("The Ultimate Question") !== "The Ultimate Question"'); 31 } 32 // 33 ////////////////////////////////////////////////////////////////////////////// 34 35 reportCompare(0, 0);