Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing error if DestructuringRestProperty is assigned to object or array literal #26005

Closed
ajafff opened this issue Jul 27, 2018 · 0 comments · Fixed by #29609
Closed

Missing error if DestructuringRestProperty is assigned to object or array literal #26005

ajafff opened this issue Jul 27, 2018 · 0 comments · Fixed by #29609
Labels
Bug A bug in TypeScript
Milestone

Comments

@ajafff
Copy link
Contributor

ajafff commented Jul 27, 2018

TypeScript Version: 3.1.0-dev.20180727

Search Terms: destructuring rest

Code

({...{}} = {});
({...[]} = []);

Expected behavior:

An error on both assignments as described in the Spec: https://tc39.github.io/ecma262/#sec-destructuring-assignment-static-semantics-early-errors

Actual behavior:

No error

Playground Link: https://agentcooper.github.io/typescript-play/#code/BQbwdBIL5QBAvLaBKA3AKFBMBtAunIvmkA

Related Issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants