dillon1000/react

Commit

Support complex computed properties in OptionalMemberExpression

Our previous lowering for OptionalMemberExpression reordered the evaluation of 
properties, such that we had to restrict the allowed properties to those that 
were safe for reordering. With the new representation we preserve order of 
evaluation, so we can relax the restriction. This unblocks a few cases in an 
internal product.
Browse files
Changed paths8 files
First-parent comparison
M compiler/forget/src/HIR/BuildHIR.ts ModifiedD compiler/forget/src/__tests__/fixtures/compiler/error.optional-computed-member-expression.expect.md DeletedA compiler/forget/src/__tests__/fixtures/compiler/optional-computed-member-expression.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/error.optional-computed-member-expression.js →compiler/forget/src/__tests__/fixtures/compiler/optional-computed-member-expression.js RenamedA compiler/forget/src/__tests__/fixtures/compiler/optional-member-expression-call-as-property.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-member-expression-call-as-property.js AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-member-expression-with-optional-member-expr-as-property.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/optional-member-expression-with-optional-member-expr-as-property.js Added
Patch

Files changed

Rendering syntax-highlighted changes…