| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-352907.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 352907; |
| 9 |
var summary = 'let declaration must be direct child of block, ' + |
| 10 |
'top-level implicit block, or switch body block'; |
| 11 |
var actual = ''; |
| 12 |
var expect = 'SyntaxError'; |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
test(); |
| 18 |
|
| 19 |
|
| 20 |
function test() |
| 21 |
{ |
| 22 |
enterFunc ('test'); |
| 23 |
printBugNumber(BUGNUMBER); |
| 24 |
printStatus (summary); |
| 25 |
|
| 26 |
try |
| 27 |
{ |
| 28 |
eval('(function() { while(0) while(0) let k=3; return k; })'); |
| 29 |
} |
| 30 |
catch(ex) |
| 31 |
{ |
| 32 |
actual = ex.name; |
| 33 |
} |
| 34 |
|
| 35 |
reportCompare(expect, actual, summary); |
| 36 |
|
| 37 |
exitFunc ('test'); |
| 38 |
} |