| Index: test/mjsunit/regress/regress-crbug-248025.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-135008.js b/test/mjsunit/regress/regress-crbug-248025.js
|
| similarity index 81%
|
| copy from test/mjsunit/regress/regress-crbug-135008.js
|
| copy to test/mjsunit/regress/regress-crbug-248025.js
|
| index 2be396e8055a916b1f7c7370ff32ff0d40eea762..c5988595663c9622853e98585ed4a4e9bed089b1 100644
|
| --- a/test/mjsunit/regress/regress-crbug-135008.js
|
| +++ b/test/mjsunit/regress/regress-crbug-248025.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2012 the V8 project authors. All rights reserved.
|
| +// Copyright 2013 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -25,21 +25,16 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| +// Flags: --harmony-iteration
|
| +
|
| // Filler long enough to trigger lazy parsing.
|
| var filler = "//" + new Array(1024).join('x');
|
|
|
| -var scope = { x:23 };
|
| -
|
| -with(scope) {
|
| - eval(
|
| - "scope.f = (function outer() {" +
|
| - " function inner() {" +
|
| - " return x;" +
|
| - " }" +
|
| - " return inner;" +
|
| - "})();" +
|
| - filler
|
| - );
|
| -};
|
| -
|
| -assertSame(23, scope.f());
|
| +// Test that the pre-parser does not crash when the expected contextual
|
| +// keyword as part if a 'for' statement is not and identifier.
|
| +try {
|
| + eval(filler + "\nfunction f() { for (x : y) { } }");
|
| + throw "not reached";
|
| +} catch (e) {
|
| + if (!(e instanceof SyntaxError)) throw e;
|
| +}
|
|
|