[Compiler Bug]: `Invariant: [InferMutationAliasingEffects] Expected value kind to be initialized` on passing reference to current function to other function#37058
What kind of issue is this?
- React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- eslint-plugin-react-hooks (build issue installing or using the eslint plugin)
- react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
Repro steps
1: give react compiler this code
export function MyComponent() {
return <HelloWorld onClick={() => {
foo(function bar() {
if (Math.random() > .5) {
baz();
} else {
qux(bar);
}
});
}} />
}