fix(codemode): enforce lexical temporal dead zones (#37358)

This commit is contained in:
Aiden Cline 2026-07-16 22:26:45 -05:00 committed by GitHub
commit 91238441a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 431 additions and 128 deletions

View file

@ -50,7 +50,7 @@ ultimate source of truth.
- [x] Direct function declarations are hoisted in program and block statement lists.
- [x] Parameter defaults observe a temporal dead zone for later parameters.
- [ ] JavaScript-correct function scoping, hoisting, and redeclaration for accepted `var` declarations.
- [ ] Predeclare `let` and `const` bindings in every lexical scope, including program/block bodies, switch bodies, and
- [x] Predeclare `let` and `const` bindings in every lexical scope, including program/block bodies, switch bodies, and
loop headers, so reads before initialization and self- or cross-referential initializers observe the JavaScript
temporal dead zone.
- [ ] Hoist function declarations accepted directly in switch cases.