Rename symbol to not proceed if conflict would occur
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 737
- Avg merge
- 17h 56m
- Merged PRs (30d)
- 21
Description
Type: Feature Request
When using the rename symbol to refactor code, the new name given to a symbol can conflict with existing symbols at the site of each rename.
What happens:
The symbol is renamed without any conflict detection and now there are two symbols that have the same name, this could cause a syntax error or even worse silently succeed but produce code that is now wrong.
Expected behavior:
If a conflict with the new symbol name is detected at any of the replacement locations, an error dialog displays such locations and does not allow the rename symbol to proceed at any of the locations.
Environment:
C# Extension: ms-dotnettools.csharp version 2.63.32
VSCode 1.97.0
Note, this old typescript closed issue also describes this, which is also linked to other issues about it ... all of which have been closed with no actual resolution occurring over the 10 year span since it was reported but is a very good description with more applicable detail if it's helpful. microsoft/TypeScript#17670
Extension version: 2.63.32
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Contributor guide
Assessment
This issue has not been assessed yet.