mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Adding test
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
//// [restElementWithNullInitializer.ts]
|
||||
function foo([...r] = null) { }
|
||||
|
||||
|
||||
//// [restElementWithNullInitializer.js]
|
||||
function foo(_a) { }
|
||||
@@ -0,0 +1 @@
|
||||
function foo([...r] = null) { }
|
||||
Reference in New Issue
Block a user