Skip to content

Fix crash on rest element destructuring with null initializer#2101

Merged
ahejlsberg merged 3 commits into
masterfrom
restElementNull
Feb 22, 2015
Merged

Fix crash on rest element destructuring with null initializer#2101
ahejlsberg merged 3 commits into
masterfrom
restElementNull

Conversation

@ahejlsberg
Copy link
Copy Markdown
Member

Fixes #2087.

Comment thread src/compiler/checker.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is anyArrayType used anywhere else?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it is used in the new isArrayLikeType function, plus some other places.

@DanielRosenwasser
Copy link
Copy Markdown
Member

Consider adding a test using undefined as the initializer as well.

Comment thread src/compiler/checker.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment no longer reflects the code below it.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

👍 (with the comment fix)

ahejlsberg added a commit that referenced this pull request Feb 22, 2015
Fix crash on rest element destructuring with null initializer
@ahejlsberg ahejlsberg merged commit 60a6b28 into master Feb 22, 2015
@ahejlsberg ahejlsberg deleted the restElementNull branch February 22, 2015 03:47
@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.

Compiler crash on rest destructuring param with null initializer

4 participants