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:
+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