Test:destructuring array initialisers refer to previous elements
This commit is contained in:
parent
225d6d6aef
commit
7a9c11c72b
1 changed files with 4 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
const [a, b = a] = [1]; // ok
|
||||
const [a, b = a, c = c] = [1]; // error for c
|
||||
const [a, b = a, c = d, d = a] = [1]; // error for c
|
||||
|
Loading…
Reference in a new issue