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

Move to new file: Moving an import statement may break code #23968

Closed
ghost opened this issue May 8, 2018 · 0 comments · Fixed by #24177
Closed

Move to new file: Moving an import statement may break code #23968

ghost opened this issue May 8, 2018 · 0 comments · Fixed by #24177
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented May 8, 2018

Code

See moveToNewFile_moveImport.ts.

[|import { a, b } from "m";
a;|]
b;

Expected behavior:

The import of b is kept in the original file since it's still needed.

Actual behavior:

The import is wholly removed from the old file, and an extra import is added to the new file for a even though it already has that.

@mhegazy mhegazy added the Bug A bug in TypeScript label May 8, 2018
@mhegazy mhegazy assigned ghost May 8, 2018
@mhegazy mhegazy added this to the TypeScript 2.9.1 milestone May 8, 2018
@ghost ghost added the Fixed A PR has been merged for this issue label May 16, 2018
@ghost ghost closed this as completed in #24177 May 17, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 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

Successfully merging a pull request may close this issue.

1 participant