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

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

Issue 720863002: Fix desugaring of let bindings in for loops to handle continue properly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ready for review Created 6 years, 1 month 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
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/regress/regress-3683.js
diff --git a/test/mjsunit/harmony/regress/regress-3683.js b/test/mjsunit/harmony/regress/regress-3683.js
new file mode 100644
index 0000000000000000000000000000000000000000..f7d9731728cc35e5de20518e44496c37a9422066
--- /dev/null
+++ b/test/mjsunit/harmony/regress/regress-3683.js
@@ -0,0 +1,36 @@
+// Copyright 2014 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-scoping
+
+"use strict";
+
+var count = 0;
+for (let x = 0; x < 10;) {
+ x++;
+ count++;
+ continue;
+}
+assertEquals(10, count);
+
+count = 0;
+label: for (let x = 0; x < 10;) {
rossberg 2014/11/14 10:58:01 Can we add additional tests with nested for-let lo
adamk 2014/11/14 19:03:36 Added a variety of tests, and commented each one.
+ while (true) {
+ x++;
+ count++;
+ continue label;
+ }
+}
+assertEquals(10, count);
+
+count = 0;
+for (let x = 0; x < 10;) {
+ x++;
+ count++;
+ {
+ let x = "hello";
+ continue;
+ }
+}
+assertEquals(10, count);
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698