Skip to content

Rename should not work on (unrelated) string literals #16275

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

Closed
amcasey opened this issue Jun 5, 2017 · 2 comments
Closed

Rename should not work on (unrelated) string literals #16275

amcasey opened this issue Jun 5, 2017 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@amcasey
Copy link
Member

amcasey commented Jun 5, 2017

Invoke Rename on one of the string literals below

function f() {
    return "function" + "function";
}

Expected: "You cannot rename this element" (as on, e.g., a keyword)
Actual: both instances are renamed

Tested in VS 2017 with both JS and TS files.

@amcasey
Copy link
Member Author

amcasey commented Jun 5, 2017

FYI @RyanCavanaugh

@amcasey
Copy link
Member Author

amcasey commented Jun 5, 2017

Same for character literals.

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jun 5, 2017
@mhegazy mhegazy assigned ghost Apr 13, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 13, 2018
@ghost ghost closed this as completed in #24477 May 30, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 30, 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

No branches or pull requests

3 participants