Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/try-catch-try-immediately-throws-after-constant-propagation.expect.md
2026-08-27 21:09:14 +00:00

42 lines
542 B
Markdown

## Input
```javascript
function Component(props) {
let x = props.default;
const y = 42;
try {
// note: this constant propagates so that we know
// the handler is unreachable
return y;
} catch (e) {
x = e;
}
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{default: 42}],
};
```
## Code
```javascript
function Component(props) {
let x;
return 42;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{ default: 42 }],
};
```
### Eval output
(kind: ok) 42