mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* fix: Preserve computed key evaluation order in nested object rest (#17274) * fix: use inline memoization for computed keys to preserve eval order * test: use distinct values to properly validate computed key ordering fix * docs: update comments to reflect inline memoization approach * refactor: remove redundant state flags and AST mutations * fix: only memoize computed keys when rest elements are present * refactor: address review feedback
14 lines
243 B
JavaScript
14 lines
243 B
JavaScript
let a = 0,
|
|
result;
|
|
for (const _ref of [["0", "1"]]) {
|
|
var _a;
|
|
const {
|
|
[_a = a++]: x
|
|
} = _ref,
|
|
y = babelHelpers.objectWithoutProperties(_ref, [_a].map(babelHelpers.toPropertyKey));
|
|
{
|
|
const a = 1;
|
|
result = x;
|
|
}
|
|
}
|