Corpus position 4105, js/web/explicit-resource-management.test.ts, currently fails the first using-syntax case because a resource is disposed before its lexical scope exits (Expected none to be disposed). Port Bun-compatible using / Symbol.dispose lowering with correct lexical and async scope boundaries, LIFO ordering, and structured chained errors/stacks for initializer, body, and disposal failures. Pin the passing fixture in the permanent regression queue and update #66.
Bun parity: preserve explicit resource management disposal scopes
#336Fixed on main by 708c895 (fix(test): port explicit resource disposal semantics). Copied corpus modules containing actual code-token using syntax now route through Home’s production Bun parser after their existing compatibility rewrites, reusing Bun’s LowerUsingDeclarationsContext for lexical scope boundaries, LIFO ordering, await using, collision-free helpers, catch/finally behavior, and SuppressedError chaining. Disposal Error objects also gain non-enumerable ERR_EXPLICIT_RESOURCE_DISPOSAL diagnostics, operation/phase metadata, a source-aware stack frame, and cause chaining on suppressed failures. Added detector and runtime structured-error regressions and pinned js/web/explicit-resource-management.test.ts at 4 passes. Verified corpus position 4105 (4 passed, 0 failed, 0 todo, 0 unsupported), the full HTTP/web tail queue, and a clean zig build.
Sign in to comment on this issue.