js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A4_T2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Function declaration in function code - If the variable object
     6  * already has a property with the name of Function Identifier, replace its
     7  * value and attributes. Semantically, this step must follow the creation of
     8  * FormalParameterList properties
     9  *
    10  * @path ch10/10.2/10.2.1/S10.2.1_A4_T2.js
    11  * @description Checking existence of a function with declared variable
    12  */
    14 //CHECK#1
    15 function f1(){
    16   var x;
    18   return x;
    20   function x(){
    21     return 7;
    22   }
    23 }
    24 if(!(f1().constructor.prototype === Function.prototype)){
    25   $PRINT('#1: f1() returns function');
    26 }
    28 //CHECK#2
    29 function f2(){
    30   var x;
    32   return typeof x;
    34   function x(){
    35     return 7;
    36   }
    37 }
    38 if(!(f2() === "function")){
    39   $PRINT('#2: f2() === "function"');
    40 }

mercurial