Adding test

This commit is contained in:
Anders Hejlsberg 2015-02-21 12:41:20 -08:00
parent a21460ff75
commit 95b3d6be58
3 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,8 @@
tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts(1,14): error TS2461: Type 'null' is not an array type.
==== tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts (1 errors) ====
function foo([...r] = null) { }
~~~~~~
!!! error TS2461: Type 'null' is not an array type.

View file

@ -0,0 +1,6 @@
//// [restElementWithNullInitializer.ts]
function foo([...r] = null) { }
//// [restElementWithNullInitializer.js]
function foo(_a) { }

View file

@ -0,0 +1 @@
function foo([...r] = null) { }