[Compiler Bug]: return without value causes bailout #32620
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/#N4Igzg9grgTgxgUxALhAMygOzgFwJYSYAEAsgJ4DCEAtgA6EKY4AUAlEcADrFFyFg5eACwRwA1kQC8RKGAQBBWrQDKCADaicEGM2YCAhjgTtJAPiIBCCwaOsA3N25EieNEWYW4I8exgIcsJgOmE5EfgEwxADkQnhRwQC+3CAJQA
Repro steps
I noticed that
return
without a value (e.g.return
vsreturn undefined
) causes compiler to bailout. Please see the below examples:https://playground.react.dev/#N4Igzg9grgTgxgUxALhAMygOzgFwJYSYAEAsgJ4DCEAtgA6EKY4AUAlEcADrFFyFg5eACwRwA1kQC8RKGAQBBWrQDKCADaicEGM2YCAhjgTtJAPiIBCCwaOsA3N25EieNEWYW4I8exgIcsJgOmE5EfgEwxADkQnhRwQC+3CAJQA
vs
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAMygOzgFwJYSYAEAsgJ4DCEAtgA6EKY4AUAlEcADrFFyFg5eACwRwA1kQC8RKGAQBBWrQDKCADaicEGM2YCAhjgTtJAPiIBCCwaOsA3N25EieNEWYW4I8exgIcsMRYACYIaHiYCMEOmE5EfgEwxADkQnjJMQC+3CCZQA
prior discussion: reactwg/react-compiler#61
How often does this bug happen?
Every time
What version of React are you using?
0.0.0-experimental-6aa8254b-20250312
What version of React Compiler are you using?
0.0.0-experimental-ecdd742-20250312
The text was updated successfully, but these errors were encountered: