mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[compiler] Remove unnecessary fixture (#33572)
This is covered by iife-inline-ternary --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33572). * #33571 * #33558 * #33547 * #33543 * #33533 * #33532 * #33530 * #33526 * #33522 * #33518 * #33514 * #33513 * #33512 * #33504 * #33500 * #33497 * #33496 * #33495 * #33494 * __->__ #33572
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
|
||||
## Input
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const x = props.foo
|
||||
? 1
|
||||
: (() => {
|
||||
throw new Error('Did not receive 1');
|
||||
})();
|
||||
return items;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Error
|
||||
|
||||
```
|
||||
2 | const x = props.foo
|
||||
3 | ? 1
|
||||
> 4 | : (() => {
|
||||
| ^^^^^^^^
|
||||
> 5 | throw new Error('Did not receive 1');
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
> 6 | })();
|
||||
| ^^^^^^^^^^^ Todo: Support labeled statements combined with value blocks (conditional, logical, optional chaining, etc) (4:6)
|
||||
7 | return items;
|
||||
8 | }
|
||||
9 |
|
||||
```
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
function Component(props) {
|
||||
const x = props.foo
|
||||
? 1
|
||||
: (() => {
|
||||
throw new Error('Did not receive 1');
|
||||
})();
|
||||
return items;
|
||||
}
|
||||
Reference in New Issue
Block a user