mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
4e591ed4ed
Fix destructured function and rest parameters that become context variables by lowering them through temporaries before `StoreContext`. This avoids inconsistent `Destructure`/context HIR and compiles supported components correctly. Validated with `just ready` and runtime equivalence checks against React 19.2.1's compiler runtime. AI usage: Implemented with assistance from OpenAI Codex.
13 lines
208 B
JavaScript
13 lines
208 B
JavaScript
import {identity} from 'shared-runtime';
|
|
|
|
function Component({x}) {
|
|
x = identity(x);
|
|
const read = () => x;
|
|
return read();
|
|
}
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [{x: 42}],
|
|
};
|