swc icon indicating copy to clipboard operation
swc copied to clipboard

`expr_simplifier` does not simplify computed `MemberExpr`s with non-literal properties

Open leafypout opened this issue 1 year ago • 0 comments

Describe the feature

expr_simplifier does not simplify computed MemberExprs that have an expression as the index.

These two examples are not simplified, but both resolve to undefined:

[][[]] // undefined
[][0] // undefined

Both of these should be simplified to undefined

Babel plugin or link to the feature description

No response

Additional context

No response

leafypout avatar Mar 14 '24 01:03 leafypout