mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A generic binding inside a function that a nested function read before the declaration lowered stores its instance into a TDZ box when the declaration runs. That value was the instance's closure, which the backend interns for module functions, so every evaluation of the declaration stored the same function object. JavaScript makes a new one each time. The stored value is now a closure over a lifted forwarder that calls the instance, so each evaluation allocates a new closure; the forwarder is created once per instance. Async and rest-parameter bindings read this way report SC1090. Corpus 7180 checks the identities.