dillon1000/react

Commit

[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; 

} 

```
Browse files
Changed paths3 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…