Array extractors can collide with assignments
Closed this issue · 1 comments
JLHwung commented
They are already valid JS:
// variable declaration + assignment
let Foo
(x) = y
// assignment + assignment
Foo
(x.z) = y
Here are some solutions for this issue:
- forbid the line terminator between
QualifiedName[?Yield, ?Await]
andExtractorArrayBindingPattern[?Yield, ?Await]
- use other sigils for the array pattern, i.e.
||
,~[]
, etc. - innovate the syntax, i.e.
let [x] with Foo = y
, etc.
JLHwung commented
Sorry for the noise. I actually turned on error recovery mode and overlook the errors.