mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[compiler] Remove unnecessary fixture
This is covered by iife-inline-ternary
This commit is contained in:
-33
@@ -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 |
|
||||
```
|
||||
|
||||
|
||||
-8
@@ -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