fix: if 支臂函数绑定收集下钻容器语句

This commit is contained in:
2026-09-17 18:29:44 +00:00
parent 36f24e1f46
commit e90edba4ec
3 changed files with 55 additions and 63 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ impl Emitter {
ctx.push_scope();
// 函数预声明先于 lexical:`{ let g; function g(){} }` 时 lexical 的预声明
// 命中已存在的函数绑定自然报重复声明错,不被静默覆盖破坏 TDZ。
self.predeclare_block_function_declarations(&block.body, ctx);
self.predeclare_block_function_declarations(&block.body, ctx, false);
// 块 lexical 声明是局部绑定:不做受限全局名检查(重复声明错在 emit 期报)。
let _ = self.predeclare_lexical_declarations(&block.body, ctx, false);
// 块级函数声明的块入口初始化:直接子(含标签直接子体)闭包物化入预