-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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: 4f717674af91d4d4b730e64cbd7a144b9faab13e Pull Request resolved: #30443
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...iler/src/__tests__/fixtures/compiler/error.bug-outlining-in-func-expr.expect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` | ||
9 changes: 9 additions & 0 deletions
9
...plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-outlining-in-func-expr.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Component2 = props => { | ||
return ( | ||
<ul> | ||
{props.items.map(item => ( | ||
<li key={item.id}>{item.name}</li> | ||
))} | ||
</ul> | ||
); | ||
}; |