Skip to content

Conversation

@yuit
Copy link
Contributor

@yuit yuit commented Mar 19, 2015

Address #2421

@DanielRosenwasser
Copy link
Member

There are no tests here for default initializers.

Consider a few like:

function f({x = 10, y: [a,b,c,d] = [1,2,3,4]} = { x: 10, y: [2,4,6,8] }) {
    return x + y[4];
}

@JsonFreeman
Copy link
Contributor

Yes, make sure that default initializers are disallowed. Also make sure that rest elements are allowed.

@JsonFreeman
Copy link
Contributor

👍

@JsonFreeman
Copy link
Contributor

🎉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great comments, thanks!

yuit added a commit that referenced this pull request Mar 30, 2015
@yuit yuit merged commit 5330db6 into master Mar 30, 2015
@yuit yuit deleted the allowDestructuringInAmbient branch March 30, 2015 23:58
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants