Skip to content

Simplify tuple destructuring logic#32178

Merged
ahejlsberg merged 9 commits intomasterfrom
improveTupleDestructuring
Jul 3, 2019
Merged

Simplify tuple destructuring logic#32178
ahejlsberg merged 9 commits intomasterfrom
improveTupleDestructuring

Conversation

@ahejlsberg
Copy link
Copy Markdown
Member

@ahejlsberg ahejlsberg commented Jun 29, 2019

This PR removes the general logic we had for padding array literals that are contextually typed by tuple types and isolates it to the one case where it is needed: parameter array binding elements with tuple type initializers of lesser arity than the array binding elements. It fixes the incorrect error that was reported in #32140 and picks up the better error messages that are reported by getIndexedAccessType.

Fixes #32140.

@ahejlsberg ahejlsberg added this to the TypeScript 3.6.0 milestone Jun 29, 2019
@ahejlsberg ahejlsberg requested a review from RyanCavanaugh June 29, 2019 03:21
@ahejlsberg
Copy link
Copy Markdown
Member Author

@typescript-bot run dt
@typescript-bot test this

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Jun 29, 2019

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 4c99084. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Jun 29, 2019

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 4c99084. You can monitor the build here. It should now contribute to this PR's status checks.

@ahejlsberg
Copy link
Copy Markdown
Member Author

@typescript-bot run dt
@typescript-bot test this

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Jun 30, 2019

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 17153a6. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Jun 30, 2019

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 17153a6. You can monitor the build here. It should now contribute to this PR's status checks.

@ahejlsberg
Copy link
Copy Markdown
Member Author

DT and RWC test runs are clean (RWC difference is unrelated to this PR).

@ahejlsberg ahejlsberg merged commit 340f810 into master Jul 3, 2019
@ahejlsberg ahejlsberg deleted the improveTupleDestructuring branch July 3, 2019 00:25
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

Contextual type from destructuring binding for Array#reduce produces bad errors

3 participants