| Index: test/mjsunit/es6/block-eval-var-over-let.js
|
| diff --git a/test/mjsunit/es6/block-eval-var-over-let.js b/test/mjsunit/es6/block-eval-var-over-let.js
|
| index 3dc8c47c209d32227bc5322b6279004f5eb308fb..e16d7a02a69a774a720daaa1415c9e6f981077eb 100644
|
| --- a/test/mjsunit/es6/block-eval-var-over-let.js
|
| +++ b/test/mjsunit/es6/block-eval-var-over-let.js
|
| @@ -61,6 +61,23 @@ assertDoesNotThrow(function() {
|
| eval('var x');
|
| });
|
|
|
| +// The same should work for lexical function declarations:
|
| +// If the const is in its own block scope, with the eval, throws
|
| +assertThrows(function() {
|
| + {
|
| + function x() {}
|
| + eval('var x');
|
| + }
|
| +}, SyntaxError);
|
| +
|
| +// If the eval is in its own block scope, throws
|
| +assertThrows(function() {
|
| + {
|
| + function y() {}
|
| + { eval('var y'); }
|
| + }
|
| +}, SyntaxError);
|
| +
|
| // In global scope
|
| let caught = false;
|
| try {
|
|
|