mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Test:destructuring array initialisers refer to previous elements
This commit is contained in:
parent
225d6d6aef
commit
7a9c11c72b
@ -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…
x
Reference in New Issue
Block a user