Files
oxc-project__oxc/crates/oxc_react_compiler/tests/snapshots/issue-23752.snap
Boshen e3c6c4e739 fix(react-compiler): initialize named function expression bindings (#25515)
Treat a named function expression’s private name as a function-entry binding through HIR, SSA, and alias analysis. This prevents self-references from reaching mutation inference uninitialized and adds fixture coverage.

Closes #23752.

Validated with targeted compiler and linter checks, workspace checking, and linting.

AI-assisted.
2026-08-12 07:38:16 +00:00

24 lines
495 B
Plaintext

---
source: crates/oxc_react_compiler/tests/snapshot.rs
input_file: crates/oxc_react_compiler/fixtures/issue-23752.tsx
---
import { c as _c } from "react/compiler-runtime";
export function Component(recursive) {
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = function recursive_0(x) {
const read = () => recursive_0;
if (x) {
return read;
}
recursive_0 = null;
return read;
};
$[0] = t0;
} else {
t0 = $[0];
}
return t0;
}