mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
A module binding whose initializer only allocates data (a function, an arrow function, a literal or a registry object) is initialized only when a reached body uses the binding. Only reads and updates counted as uses, so a binding that reached code only assigned was never initialized, and the assignment, which checks that the binding is initialized and releases its value, threw "Cannot access '<name>' before initialization" where Node runs. Assignments now count as uses. Corpus 8320 assigns two such bindings, one through an assignment expression, without reading them.