diff --git a/tasks/transform_conformance/snapshots/oxc.snap.md b/tasks/transform_conformance/snapshots/oxc.snap.md index 5f4079853e386..8a807f7e8baef 100644 --- a/tasks/transform_conformance/snapshots/oxc.snap.md +++ b/tasks/transform_conformance/snapshots/oxc.snap.md @@ -1,6 +1,6 @@ commit: 578ac4df -Passed: 139/226 +Passed: 138/226 # All Passed: * babel-plugin-transform-class-static-block @@ -320,10 +320,21 @@ x Output mismatch x Output mismatch -# babel-plugin-proposal-explicit-resource-management (1/2) +# babel-plugin-proposal-explicit-resource-management (0/2) * export-class-name/input.js x Output mismatch +* for-of-no-block/input.js +Scope children mismatch: +after transform: ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5), ScopeId(7)] +rebuilt : ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(5), ScopeId(7)] +Scope children mismatch: +after transform: ScopeId(4): [] +rebuilt : ScopeId(3): [ScopeId(4)] +Scope parent mismatch: +after transform: ScopeId(3): Some(ScopeId(1)) +rebuilt : ScopeId(4): Some(ScopeId(3)) + # legacy-decorators (2/66) * oxc/metadata/bound-type-reference/input.ts diff --git a/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/input.js b/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/input.js index 7720df4147bbc..ce5bd88dd76d2 100644 --- a/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/input.js +++ b/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/input.js @@ -1,2 +1,3 @@ -for (using x of it) - doSomethingWith(x); +// The arrow functions in this test case are to make sure that scopes are re-parented correctly +for (using x of (() => it)()) + doSomethingWith(x, () => {}); diff --git a/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/output.js b/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/output.js index f27eb6ec1d3a8..03f34f9729db2 100644 --- a/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/test/fixtures/for-of-no-block/output.js @@ -1,8 +1,8 @@ -for (const _x of it) +for (const _x of (() => it)()) try { var _usingCtx = babelHelpers.usingCtx(); const x = _usingCtx.u(_x); - doSomethingWith(x); + doSomethingWith(x, () => {}); } catch (_) { _usingCtx.e = _; } finally {