|
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 * Global FunctionDeclaration cannot be defined within the body of another FunctionDeclaration |
|
6 * |
|
7 * @path ch14/14.0/S14_A3.js |
|
8 * @description Declaring a function within the body of another function |
|
9 */ |
|
10 |
|
11 ////////////////////////////////////////////////////////////////////////////// |
|
12 //CHECK#1 |
|
13 if (typeof __func !== "function") { |
|
14 $ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+ typeof __func ); |
|
15 } |
|
16 // |
|
17 ////////////////////////////////////////////////////////////////////////////// |
|
18 |
|
19 ////////////////////////////////////////////////////////////////////////////// |
|
20 //CHECK#2 |
|
21 if (typeof __gunc !== "undefined") { |
|
22 $ERROR('#2: typeof __gunc === "undefined". Actual: typeof __gunc ==='+ typeof __gunc ); |
|
23 } |
|
24 // |
|
25 ////////////////////////////////////////////////////////////////////////////// |
|
26 |
|
27 function __func(){ |
|
28 function __gunc(){return true}; |
|
29 } |
|
30 |