Wed, 31 Dec 2014 13:27:57 +0100
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 possible as long as this.any_Function is declared and called
6 *
7 * @path ch13/13.2/S13.2.2_A11.js
8 * @description Calling a function as a constructor after it has been declared with "function func()"
9 */
11 function FACTORY(){
12 this.id = 0;
14 this.id = this.func();
16 function func(){
17 return "id_string";
18 }
20 }
21 //////////////////////////////////////////////////////////////////////////////
22 //CHECK#1
23 try {
24 var obj = new FACTORY();
25 $ERROR('#1: var obj = new FACTORY() lead to throwing exception');
26 } catch (e) {
27 if (e instanceof Test262Error) throw e;
28 }
29 //
30 //////////////////////////////////////////////////////////////////////////////