S13_A6_T1.js (1039B)
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: | 6 FunctionDeclaration can be overrided by other FunctionDeclaration with 7 the same Identifier 8 es5id: 13_A6_T1 9 description: Duplicating function declaration 10 ---*/ 11 12 function __func(){return 1}; 13 14 var __store__func = __func; 15 16 var __1 = __func(); 17 18 function __func(){return 'A'}; 19 20 var __A = __func(); 21 22 ////////////////////////////////////////////////////////////////////////////// 23 //CHECK#1 24 if (__store__func !== __func) { 25 throw new Test262Error('#1: __store__func === __func. Actual: __store__func ==='+__store__func); 26 } 27 // 28 ////////////////////////////////////////////////////////////////////////////// 29 30 ////////////////////////////////////////////////////////////////////////////// 31 //CHECK#2 32 if (__1 !== __A) { 33 throw new Test262Error('#2: __1 === __A. Actual: __1 ==='+__1); 34 } 35 // 36 ////////////////////////////////////////////////////////////////////////////// 37 38 reportCompare(0, 0);