What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAgHgBwjALgAgDMoA7OXASwhPwFkBPAYQgFtsSETcAKASn2AAdGvhgJcsGgB4AEggA28iAHUc8gCb5qjeRTgBrALzA++QwD4Bw-DaIQI3YmUrV8AIwCGMU0JG38FIT43LQeuAAWAHQwHiTqrKaWkQCs-L7+-p4AXnwA3NYZAL74CmAIVn4ZAI5Q6NyeMLz5lTaFBa1NBYXFAPTmwm0kIAA0IHDUhBQA5igg6fg9PeNsFPJhVCS0EOoIyPiCIB6KBwMj4OEQAO4AklwIMCRHYCiETwiFQA
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);
}
});
}} />
}
2: notice the following error
Found 1 error:
Invariant: [InferMutationAliasingEffects] Expected value kind to be initialized
<unknown> bar$5.
5 | baz();
6 | } else {
> 7 | qux(bar);
| ^^^ this is uninitialized
8 | }
9 | });
10 | }} />
How often does this bug happen?
Every time
What version of React are you using?
the version in playground.react.dev
What version of React Compiler are you using?
the version in playground.react.dev
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAgHgBwjALgAgDMoA7OXASwhPwFkBPAYQgFtsSETcAKASn2AAdGvhgJcsGgB4AEggA28iAHUc8gCb5qjeRTgBrALzA++QwD4Bw-DaIQI3YmUrV8AIwCGMU0JG38FIT43LQeuAAWAHQwHiTqrKaWkQCs-L7+-p4AXnwA3NYZAL74CmAIVn4ZAI5Q6NyeMLz5lTaFBa1NBYXFAPTmwm0kIAA0IHDUhBQA5igg6fg9PeNsFPJhVCS0EOoIyPiCIB6KBwMj4OEQAO4AklwIMCRHYCiETwiFQA
Repro steps
1: give react compiler this code
2: notice the following error
How often does this bug happen?
Every time
What version of React are you using?
the version in playground.react.dev
What version of React Compiler are you using?
the version in playground.react.dev