mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
A binding that a function declared earlier captures is pre-declared as a TDZ box, and its declaration's assign initializes the box. The declaration dropped the pre-declaration before lowering its initializer. When the initializer failed with a degradable type (a cast whose type does not compile) and the statement commit point lowered the statement again, the retry no longer saw the box: it declared a new local and initialized that, and a later call of the function threw ReferenceError. The pre-declaration is now dropped after the initializer lowers, for variable, class and generic-function declarations.