Debian Codegraph @

js/src/tests/test262/language/statements/if/S12.5_A10_T2.js

raw
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 info: Function expession inside the "if" expression is allowed
6 es5id: 12.5_A10_T2
7 description: >
8 Using function expession "function __func(){return 0;}()" within
9 "if" expression
10 ---*/
11
12 //////////////////////////////////////////////////////////////////////////////
13 //CHECK#
14 if(function __func(){return 0;}()){
15 throw new Test262Error('#1: Function expession inside the if expression is allowed');
16 }else {
17 ;
18 }
19 //
20 //////////////////////////////////////////////////////////////////////////////
21
22 reportCompare(0, 0);