ReviewOS

home-lang/home

Using lowering: keep generated temp refs unique across sibling switches

#579
Closed chris opened this 10 days ago ·
10 days ago

Follow-up to #66 from the unchanged pinned Bun transpiler corpus at source pin 4982b91e3702094330f3be3883354c52b8c01323.

Lowering two sibling switch statements containing using declarations reuses __bun_temp_ref_1$, producing output that fails to reparse with a duplicate declaration. The temp-ref allocator must remain unique across sibling lowering scopes while retaining correct reverse disposal and binding visibility.

Acceptance: all unchanged using declarations in switch statements cases pass, including synchronous and await using variants.

10 days ago

Resolved by e4f0212a21b8d607a8f7feeaada87d5adad38f8c. temp_ref_count now remains monotonic across statement bodies, matching Bun commit 8d7c08040c. All five unchanged switch-using cases pass, including sibling-switch reparsing, async disposal, scope visibility, and reverse disposal order.

Sign in to comment on this issue.