Files
oxc-project__oxc/crates/oxc_react_compiler/tests/snapshots/duplicate-named-function-expression-names.snap
Boshen 33d4ed9dec fix(react-compiler): preserve unreferenced function expression names (#25733)
Preserve named function expression names when the private name is unreferenced. This matches React Compiler lowering and avoids changing observable `Function.name` values.

Validated with `just ready`.

AI-assisted.
2026-08-16 05:27:34 +00:00

26 lines
612 B
Plaintext

---
source: crates/oxc_react_compiler/tests/snapshot.rs
input_file: crates/oxc_react_compiler/fixtures/duplicate-named-function-expression-names.tsx
---
import { c as _c } from "react/compiler-runtime";
export function Component(t0) {
const $ = _c(2);
const { value } = t0;
let t1;
if ($[0] !== value) {
const columns = [{ render: function Render(input) {
const copy = input;
return copy + value;
} }, { render: function Render(input_0) {
const copy_0 = input_0;
return copy_0 + value;
} }];
t1 = <div>{columns}</div>;
$[0] = value;
$[1] = t1;
} else {
t1 = $[1];
}
return t1;
}