1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Flags: --harmony-scoping
11 for (let x = 0; x < 10;) {
16 assertEquals(10, count);
20 label: for (let x = 0; x < 10;) {
27 assertEquals(10, count);
31 label: for (let x = 0; x < 10;) {
36 assertEquals(10, count);
38 // Shadowing loop variable in same scope as continue
40 for (let x = 0; x < 10;) {
48 assertEquals(10, count);
50 // Nested let-bound for loops, inner continue
52 for (let x = 0; x < 10;) {
54 for (let y = 0; y < 2;) {
60 assertEquals(20, count);
62 // Nested let-bound for loops, outer continue
64 for (let x = 0; x < 10;) {
66 for (let y = 0; y < 2;) {
72 assertEquals(20, count);
74 // Nested let-bound for loops, labeled continue
76 outer: for (let x = 0; x < 10;) {
78 for (let y = 0; y < 2;) {
81 if (y == 2) continue outer;
84 assertEquals(20, count);