Skip to content

Rename misses a case #17782

Closed
Closed
@amcasey

Description

@amcasey
class C {
    f1: number;
    f2: this["f1"] = this["f1"];
}

There are three occurrences of "f1": (a) in the property name, (b) in the type annotation, and (c) in the initializer.

Expected: if you rename any occurrence of "f1", all occurrences are updated.
Actual: If you rename (a), (a) & (c) are updated. If you rename (b), (b) & (c) are updated. If you rename (c), (a) & (c) are updated. This suggests that the (b) rename is acting on the string literal, rather than the property name.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbolFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions