51 lines
675 B
Markdown
51 lines
675 B
Markdown
|
|
## Input
|
|
|
|
```javascript
|
|
function Component() {
|
|
const x = [];
|
|
for (const item of [1, 2]) {
|
|
break;
|
|
}
|
|
return x;
|
|
}
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [],
|
|
isComponent: false,
|
|
};
|
|
|
|
```
|
|
|
|
## Code
|
|
|
|
```javascript
|
|
import { c as _c } from "react/compiler-runtime";
|
|
function Component() {
|
|
const $ = _c(1);
|
|
let t0;
|
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
t0 = [];
|
|
$[0] = t0;
|
|
} else {
|
|
t0 = $[0];
|
|
}
|
|
const x = t0;
|
|
for (const item of [1, 2]) {
|
|
break;
|
|
}
|
|
|
|
return x;
|
|
}
|
|
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
fn: Component,
|
|
params: [],
|
|
isComponent: false,
|
|
};
|
|
|
|
```
|
|
|
|
### Eval output
|
|
(kind: ok) [] |