[compiler] Repro for outlining bug in funcexprs

I discovered this compiler crash while trying to do an internal sync of
the compiler. Any kind of outlining appears to crash the babel plugin
when the component is a function expression.

ghstack-source-id: 4f717674af
Pull Request resolved: https://github.com/facebook/react/pull/30443
This commit is contained in:
Lauren Tan
2024-07-24 16:02:28 -04:00
parent c0b76a6831
commit 91e4f0712e
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,24 @@
## Input
```javascript
const Component2 = props => {
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.name}</li>
))}
</ul>
);
};
```
## Error
```
Invalid value used in weak set
```
@@ -0,0 +1,9 @@
const Component2 = props => {
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.name}</li>
))}
</ul>
);
};