mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
ecab5f7d2b
Removes synthetic expression statements emitted after captured compound assignments when their value is unused. The lowering-created context load is tagged so analysis retains it, while codegen can omit it after the lvalue is pruned. Consumed assignment results are preserved. Validated with `env -u NO_COLOR just ready`. AI assistance: Codex was used to investigate, implement, and validate this change.
15 lines
267 B
JavaScript
15 lines
267 B
JavaScript
function Component({values}) {
|
|
let count = 0;
|
|
values.forEach(value => {
|
|
count += value;
|
|
const result = count += value;
|
|
console.log(result);
|
|
});
|
|
return count;
|
|
}
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [{values: [1, 2]}],
|
|
};
|