Fix wrong error for a lexical redeclaration test (#3575)

The test as originally specified fails in all compatible parsers, but for the wrong reason. Below is an excerpt from V8, but all parser I tested behave the same:

```js
for (const x; false; ) {
           ^
SyntaxError: Missing initializer in const declaration
```

After the change the error is the assumed:

```js
  var x;
      ^
SyntaxError: Identifier 'x' has already been declared
```
This commit is contained in:
Dmitriy Kubyshkin 2022-06-17 04:24:51 +02:00 committed by GitHub
parent f169ba6ec7
commit ba5529d926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,6 +17,6 @@ es6id: 13.7.4
$DONOTEVALUATE();
for (const x; false; ) {
for (const x = 0; false; ) {
var x;
}