js/src/tests/test262/ch13/13.2/S13.2.2_A14.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  * Calling a function as a constructor is inadmissible as long as this.any_Function is declared by eval and called
     6  *
     7  * @path ch13/13.2/S13.2.2_A14.js
     8  * @description Calling a function as a constructor after it has been declared by eval
     9  * @noStrict
    10  */
    12 function FACTORY(){
    13    this.id = 0;
    15    eval("function func(){return \"id_string\";}");
    17    this.id = func();
    19 }
    20 //////////////////////////////////////////////////////////////////////////////
    21 //CHECK#1
    22 try {
    23 	var obj = new FACTORY();
    24 } catch (e) {
    25 	$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception');
    26 }
    27 //
    28 //////////////////////////////////////////////////////////////////////////////

mercurial