Skip to content

Commit 27380f4

Browse files
committed
Adding test
1 parent 546da60 commit 27380f4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/cases/conformance/es6/destructuring/destructuringWithLiteralInitializers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ f6({ x: 1 });
3333
f6({ y: 1 });
3434
f6({ x: 1, y: 1 });
3535

36+
// (arg?: { a: { x?: number, y?: number } }) => void
37+
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
38+
f7();
39+
f7({ a: {} });
40+
f7({ a: { x: 1 } });
41+
f7({ a: { y: 1 } });
42+
f7({ a: { x: 1, y: 1 } });
43+
3644
// (arg: [any, any]) => void
3745
function g1([x, y]) { }
3846
g1([1, 1]);

0 commit comments

Comments
 (0)