seafox icon indicating copy to clipboard operation
seafox copied to clipboard

Parenthesized LHS is not reinterpreted as parethensized destructuring target in some edge cases

Open JLHwung opened this issue 5 years ago • 2 comments

([(a) = []] = []) => {}
async ([(a) = []] = []) => {};
function f([(a) = []] = []) {};

should throw

JLHwung avatar Nov 09 '20 15:11 JLHwung

Good catch! Note that this parser was only an experiment. What do you use Seafox for?

KFlash avatar Nov 09 '20 22:11 KFlash

Oh I found this bug when I was working on https://github.com/babel/babel/pull/12327. I constructed edge examples on astexplorer so I know whether Babel parsed them correctly. It is just convenient to see if these edge cases can fail other parser implementations, too.

That said I am not blocked by this issue, nor do I believe it practically block people. So take your time 😄 It is just a good-to-know issue report and offers test examples for future parser implementation.

JLHwung avatar Nov 10 '20 00:11 JLHwung