Debian Codegraph @

rhino/testsrc/tests/js1_7/decompilation/regress-349605.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-349605.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 349605;
9 var summary = 'decompilation of let inside |for| statements';
10 var actual = '';
11 var expect = '';
12
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
16
17 function test()
18 {
19 enterFunc ('test');
20 printBugNumber(BUGNUMBER);
21 printStatus (summary);
22
23 var f = function()
24 { alert(1); for((let(y=3) let(y=4) y); 0; x++) ; alert(6); }
25
26 expect = 'function () {\n alert(1);\n' +
27 ' for ((let (y = 3) (let (y = 4) y)); 0; x++) {\n' +
28 ' }\n' +
29 ' alert(6);\n' +
30 '}';
31
32 actual = f + '';
33
34 compareSource(expect, actual, summary);
35
36 exitFunc ('test');
37 }