seafox
seafox copied to clipboard
Parenthesized LHS is not reinterpreted as parethensized destructuring target in some edge cases
([(a) = []] = []) => {}
async ([(a) = []] = []) => {};
function f([(a) = []] = []) {};
should throw
Good catch! Note that this parser was only an experiment. What do you use Seafox for?
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.