| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 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 |
} |