💻
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
REPL
var iterCount = 0;
for (const [x = 23] = [,]; iterCount < 1; ) {
assert.sameValue(x, 23);
// another statement
iterCount += 1;
}
assert.sameValue(iterCount, 1, 'Iteration occurred as expected');
Configuration file name
.babelrc
Configuration
env targets: chrome 50
Current and expected behavior
Current behavior:
'Const declarations' require an initialization value. (5:16)
3 | var iterCount = 0;
4 |
> 5 | for (const _ref, x = _ref === void 0 ? 23 : _ref; iterCount < 1;) {
| ^
6 | assert.sameValue(x, 23); // another statement
7 |
8 | iterCount += 1;
expect behavior:
compile without error.
Environment
Babel Playground.
Possible solution
No response
Additional context
This is a test case from test262.
💻
How are you using Babel?
Programmatic API (
babel.transform,babel.parse)Input code
REPL
Configuration file name
.babelrc
Configuration
env targets: chrome 50
Current and expected behavior
Current behavior:
expect behavior:
compile without error.
Environment
Babel Playground.
Possible solution
No response
Additional context
This is a test case from test262.