From 27380f40dccd2b0df0c2b7356e1efff86cded02f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 6 Sep 2015 08:55:13 -0700 Subject: [PATCH] Adding test --- .../destructuring/destructuringWithLiteralInitializers.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts b/tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts index 04298d8cbd7..dd3a0ae28a6 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts @@ -33,6 +33,14 @@ f6({ x: 1 }); f6({ y: 1 }); f6({ x: 1, y: 1 }); +// (arg?: { a: { x?: number, y?: number } }) => void +function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } +f7(); +f7({ a: {} }); +f7({ a: { x: 1 } }); +f7({ a: { y: 1 } }); +f7({ a: { x: 1, y: 1 } }); + // (arg: [any, any]) => void function g1([x, y]) { } g1([1, 1]);