feat: 循环 let/const 每迭代绑定(MAKE_CELL_FRESH + 解构捕获修复)

This commit is contained in:
2026-08-10 10:18:39 +08:00
parent e03ec0f635
commit 80cb1c2feb
17 changed files with 320 additions and 46 deletions
@@ -22,7 +22,7 @@ impl Emitter {
}
if let Some(init) = &d.init {
let val_reg = self.emit_expression(init, ctx)?;
self.emit_binding_pattern(&d.id, val_reg, decl.kind, is_const, ctx)?;
self.emit_binding_pattern(&d.id, val_reg, decl.kind, is_const, false, ctx)?;
if let BindingPattern::BindingIdentifier(bi) = &d.id {
if crate::is_anonymous_function_definition(init) {
if let Some(sub_mod) = ctx.nested.last_mut() {