[Compiler Bug]: function parameter inside component override outer parameter incorrectly #31014
Open
1 of 4 tasks
Labels
Component: Optimizing Compiler
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhHCA7MAXABASwwBMEAPAfQAZcBeXGBARynwYAoAdEAOgHpIAtgl6ESpLgEoA3BwyyAZlAxxs+TLgBiMfAmIAZfDjbACxMrgC+E3MFm5c6LHnnbdRAAoBDDAgA2YWlwXHWIwbgFPAAc2NmC3ABpTMWsaAD4bO3tcXl5cMARHIlxPGABzXAh5XAjIioA3BBhtElxsAAsECqhsRqSyKmL5HpgHCAFI-F8ETPsGbFgMXAAeUX7KbgBlMYQvH19UmayuOOJkLlwAaiDXYku+0hlFrKWRMwp1raFdvwOnq0fZgh5jBFksiPg6r8sjYTh5vH4wBZMi9wZDZLIkRgQBYgA
Repro steps
Using webpack with typescript.
import { SomePanel } "./some/index";
may compiled into something likeconst index_0 = __importDefault(__webpack_require__("./some/index.js"));
React compiler don't recongize it, and compile the
index
arg inarray.map((value, index)=>{})
intoindex_0
, which falsy override the imported module and become a number.How often does this bug happen?
Every time
What version of React are you using?
19.0.0-rc-4c58fce7-20240904
The text was updated successfully, but these errors were encountered: