Only accept for-of loops in ECMA6 mode.

This commit is contained in:
Max Schaefer
2014-09-29 10:16:22 +01:00
committed by Marijn Haverbeke
parent daedc6fcb3
commit 015a0e90bc
2 changed files with 6 additions and 2 deletions

View File

@@ -28594,6 +28594,10 @@ testFail("const a;", "Unexpected token (1:7)", {ecmaVersion: 6});
testFail("for(const x = 0;;);", "Unexpected token (1:4)", {ecmaVersion: 6});
testFail("for(x of a);", "Unexpected token (1:6)");
testFail("for(var x of a);", "Unexpected token (1:10)");
// Assertion Tests
(function() {
var actualComments = [],