Skip to content

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

Closed
@amcasey

Description

@amcasey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions