mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Test:destructuring array initialisers refer to previous elements
This commit is contained in:
1 parent
225d6d6aef
commit
7a9c11c72b
1 file changed
+4
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user