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

Error replacing statement that shares line with another statement #22492

Closed
ghost opened this issue Mar 12, 2018 · 1 comment
Closed

Error replacing statement that shares line with another statement #22492

ghost opened this issue Mar 12, 2018 · 1 comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Mar 12, 2018

TypeScript Version: master

Code

See refactorConvertToEs6Module_export_referenced.ts (as of #22361)

Expected behavior:

_z; z;

Actual behavior:

_z  z;
@ghost
Copy link
Author

ghost commented Mar 13, 2018

This isn't due to the statements sharing the same line, but because refactorConvertToEs6Module replaces the whole function, then tries replacing part of the function. We should have been catching this error in textChanges but weren't due to a bug.

@ghost ghost added the Bug A bug in TypeScript label Mar 13, 2018
@mhegazy mhegazy assigned ghost Apr 3, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 3, 2018
@ghost ghost closed this as completed in #22507 Apr 16, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 16, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 26, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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