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