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

es2015 transform creates invalid range #23370

Closed
ghost opened this issue Apr 12, 2018 · 2 comments
Closed

es2015 transform creates invalid range #23370

ghost opened this issue Apr 12, 2018 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Apr 12, 2018

See the TODO: GH#23370 comment in es2015.ts. Removing /*noAssert*/ true makes the test destructuringReassignsRightHandSide fail.

ghost pushed a commit that referenced this issue Apr 12, 2018
@mhegazy mhegazy assigned ghost Apr 12, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label Apr 12, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 12, 2018
@ghost
Copy link
Author

ghost commented Apr 12, 2018

I can reproduce this with just: var { foo } = foo;. In flattenDestructuringBinding we push a declaration for the right foo before we push a declaration for the left foo, but not sure why. @rbuckton Could you help?

@mhegazy mhegazy modified the milestones: TypeScript 3.0, TypeScript 3.1 Jul 2, 2018
@ghost ghost added the Fixed A PR has been merged for this issue label Sep 4, 2018
ghost pushed a commit that referenced this issue Sep 5, 2018
* Remove duplicate function createTextRange

* Always allow end=-1

* Put noAssert back, pending #23370

* Use getRangeUnion helper

* Update API (#24966)
@ghost
Copy link
Author

ghost commented Sep 17, 2018

Fixed by #23346.

@ghost ghost closed this as completed Sep 17, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

1 participant