Debian Codegraph @

rhino/testsrc/tests/js1_7/regress/regress-406477.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-406477.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 406477;
9 var summary = 'eval of function x() in a function with an argument "x" and "let x"';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 function test2(x, src)
25 {
26 var y = 1;
27 {
28 let x = 2;
29 let y = 2;
30 eval(src);
31 }
32 return [x, y];
33 }
34
35 var expect = actual = '';
36
37 var [test_param_result, test_var_result] =
38 test2(1, "function x() { }\nfunction y() { }\n");
39
40 if (typeof test_param_result != "function")
41 actual += "Unexpected test_param_result value: "+uneval(test_param_result)+"\n";
42
43 if (typeof test_var_result != "function")
44 actual += "Unexpected test_var_result value: "+uneval(test_var_result)+"\n";
45
46 reportCompare(expect, actual, summary);
47
48 exitFunc ('test');
49 }