js/src/tests/test262/ch13/13.0/S13_A19_T2.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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  * "var" does not override function declaration
     6  *
     7  * @path ch13/13.0/S13_A19_T2.js
     8  * @description Creating a function and a variable with identical Identifiers within function scope
     9  */
    11 (function (){
    13     // since "var" does not override function declaration __decl is set to function
    14     //////////////////////////////////////////////////////////////////////////////
    15     //CHECK#1
    16     if (typeof __decl !== "function") {
    17     	$ERROR('#1: typeof __decl === "function". Actual: typeof __decl ==='+typeof __decl);
    18     }
    19     //
    20     //////////////////////////////////////////////////////////////////////////////
    22     var __decl = 1;
    24     //since statement was evaluted __decl turns to 1 from function
    25     //////////////////////////////////////////////////////////////////////////////
    26     //CHECK#2
    27     if (__decl !== 1) {
    28     	$ERROR('#2: __decl === 1. Actual: __decl ==='+__decl);
    29     }
    30     //
    31     //////////////////////////////////////////////////////////////////////////////
    33     function __decl(){return 1;}
    34 })();    

mercurial