2022-04-07 06:43:10 +03:00
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:1:1]
|
|
|
|
1 | [...a,]=[...spread,];
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
2 | const [...a,] = [...spread,];
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:1:1]
|
|
|
|
1 | [...a,]=[...spread,];
|
2022-04-07 06:43:10 +03:00
|
|
|
2 | const [...a,] = [...spread,];
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
3 | ([...a,],)=>{};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:2:1]
|
|
|
|
2 | const [...a,] = [...spread,];
|
2022-04-07 06:43:10 +03:00
|
|
|
3 | ([...a,],)=>{};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
4 | ({...a,},)=>{};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:3:1]
|
|
|
|
3 | ([...a,],)=>{};
|
2022-04-07 06:43:10 +03:00
|
|
|
4 | ({...a,},)=>{};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
5 | (...a,)=>{};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:4:1]
|
|
|
|
4 | ({...a,},)=>{};
|
2022-04-07 06:43:10 +03:00
|
|
|
5 | (...a,)=>{};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
6 | class c {
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:6:1]
|
|
|
|
6 | class c {
|
|
|
|
7 | constructor(...a,){}
|
|
|
|
: ^
|
|
|
|
8 | fn(...a,) {}
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:7:1]
|
|
|
|
7 | constructor(...a,){}
|
|
|
|
8 | fn(...a,) {}
|
|
|
|
: ^
|
|
|
|
9 | }
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:9:1]
|
|
|
|
9 | }
|
2022-04-07 06:43:10 +03:00
|
|
|
10 | function fn([...a,],) {};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
11 | function fn({...a,},) {};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:10:1]
|
|
|
|
10 | function fn([...a,],) {};
|
2022-04-07 06:43:10 +03:00
|
|
|
11 | function fn({...a,},) {};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
12 | function fn(...a,) {};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:11:1]
|
|
|
|
11 | function fn({...a,},) {};
|
2022-04-07 06:43:10 +03:00
|
|
|
12 | function fn(...a,) {};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
13 | ({...a,}={...spread,});
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:12:1]
|
|
|
|
12 | function fn(...a,) {};
|
2022-04-07 06:43:10 +03:00
|
|
|
13 | ({...a,}={...spread,});
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
14 | const {...a,} = {...spread,};
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:13:1]
|
|
|
|
13 | ({...a,}={...spread,});
|
2022-04-07 06:43:10 +03:00
|
|
|
14 | const {...a,} = {...spread,};
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
15 | for ([...a,] of a) {}
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:14:1]
|
|
|
|
14 | const {...a,} = {...spread,};
|
2022-04-07 06:43:10 +03:00
|
|
|
15 | for ([...a,] of a) {}
|
|
|
|
: ^
|
2022-11-28 18:56:47 +03:00
|
|
|
16 | for ({...a,} of b) {}
|
2022-04-07 06:43:10 +03:00
|
|
|
`----
|
|
|
|
|
|
|
|
x Trailing comma isn't permitted after a rest element
|
2022-11-28 18:56:47 +03:00
|
|
|
,-[$DIR/tests/errors/rest-trailing-comma/input.js:15:1]
|
|
|
|
15 | for ([...a,] of a) {}
|
2022-04-07 06:43:10 +03:00
|
|
|
16 | for ({...a,} of b) {}
|
|
|
|
: ^
|
|
|
|
`----
|