More tests for binding elements referencing previous elements
This commit is contained in:
parent
72a1e85cd7
commit
4efa61cf80
|
@ -1,4 +1,10 @@
|
|||
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
|
||||
const [c, d = c, e = e] = [1]; // error for e = e
|
||||
const [f, g = f, h = i, i = f] = [1]; // error for h = i
|
||||
|
||||
(function ([a, b = a]) { // ok
|
||||
})([1]);
|
||||
(function ([c, d = c, e = e]) { // error for e = e
|
||||
})([1]);
|
||||
(function ([f, g = f, h = i, i = f]) { // error for h = i
|
||||
})([1])
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
const {
|
||||
a = 1,
|
||||
b = 2,
|
||||
c = b, // ok
|
||||
d = a, // ok
|
||||
e = f, // error
|
||||
f = f // error
|
||||
} = { } as any;
|
Loading…
Reference in a new issue