mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
//// [tests/cases/conformance/es6/destructuring/restElementWithInitializer2.ts] ////
|
|
|
|
//// [restElementWithInitializer2.ts]
|
|
declare var a: number[];
|
|
var x: number[];
|
|
[...x = a] = a; // Error, rest element cannot have initializer
|
|
|
|
|
|
//// [restElementWithInitializer2.js]
|
|
"use strict";
|
|
var x;
|
|
[...x = a] = a; // Error, rest element cannot have initializer
|