dillon1000/react
Commit
Browse files [lower] Bail out on computed lvalues in destructure
---
Currently, we're silently producing incorrect output -
```js
// source
function Component(props) {
const computedKey = props.key;
const { [computedKey]: x } = props.val;
return x;
}
// compiles to
function Component(props) {
const { computedKey: x } = props.val;
return x;
}
```Changed paths3 files
First-parent comparisoncompiler/forget/src/HIR/BuildHIR.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/error._todo.computed-lval-in-destructure.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/error._todo.computed-lval-in-destructure.js AddedPatch
Files changed
Rendering syntax-highlighted changes…