Skip to content

Commit 7a9c11c

Browse files
committed
Test:destructuring array initialisers refer to previous elements
1 parent 225d6d6 commit 7a9c11c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const [a, b = a] = [1]; // ok
2+
const [a, b = a, c = c] = [1]; // error for c
3+
const [a, b = a, c = d, d = a] = [1]; // error for c
4+

0 commit comments

Comments
 (0)