mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
fca2e0cfed
Rejects initialized `let` and `const` declarations in `for...in` during parsing while preserving Annex B's non-strict `var` form. Adds misc coverage for valid and invalid initializer forms. Verified with `just ready` and parser conformance. Closes #25149. AI-assisted.
4 lines
114 B
JavaScript
4 lines
114 B
JavaScript
// Annex B.3.5 disallows a `var` initializer in a for-in head in strict mode.
|
|
"use strict";
|
|
for (var a = 1 in b);
|