1fb76f055a
The ES6 grammar forbids the initialization of variable declarations in IterationStatements. This CL will report `for (var x = y in z)` as a SyntaxError in strict mode (as done in JSC). It is possible that this could break sites in sloppy mode, and so that change can wait. BUG= R= LOG=N Review URL: https://codereview.chromium.org/1033823002 Cr-Commit-Position: refs/heads/master@{#27639}
8 lines
391 B
Plaintext
8 lines
391 B
Plaintext
# 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.
|
|
*%(basename)s:8: SyntaxError: for-of loop variable declaration may not have an initializer.
|
|
for (var x = void 0 of [1, 2, 3]) {
|
|
^^^^^^^^^^
|
|
SyntaxError: for-of loop variable declaration may not have an initializer.
|