Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: test/mjsunit/harmony/regress/regress-4904.js

Issue 1887743002: Re-scope inner scopes in arrow parameter initializers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase and mark mjsunit/harmony/regress/regress-4658 as good for ignition Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parameter-initializer-rewriter.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/regress/regress-4904.js
diff --git a/test/mjsunit/harmony/regress/regress-4904.js b/test/mjsunit/harmony/regress/regress-4904.js
new file mode 100644
index 0000000000000000000000000000000000000000..a57d246b6f0b4600263bfb142ede37288b9ee0d4
--- /dev/null
+++ b/test/mjsunit/harmony/regress/regress-4904.js
@@ -0,0 +1,24 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-do-expressions
+
+(function testCatchScopeInDoExpression() {
+ var f = (s = 17, y = do { try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
+
+(function testCatchScopeInDoExpression() {
+ var f = (s = 17, y = do { let t; try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
+
+(function testCatchScopeInDoExpression() {
+ let t1;
+ var f = (s = 17, y = do { let t2; try { throw 25; } catch(e) { s += e; }; }) => s;
+ var result = f();
+ assertEquals(result, 42);
+})();
« no previous file with comments | « src/parsing/parameter-initializer-rewriter.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698