dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.83k stars 773 forks source link

Support / fix replacing reference (Refactor -> Rename) of F# operator #17221

Open vsfeedback opened 1 month ago

vsfeedback commented 1 month ago

This issue has been moved from a ticket on Developer Community.


Now if I try to replace an operator with another one using rename in visual studio, I can't because no matter what I put in the box is saying 'new variable is invalid name'


Original Comments

Feedback Bot on 10/7/2023, 08:16 AM:

(private comment, text removed)

abelbraaksma commented 1 month ago

Verified, operators seem to lead to an error in the rename box. I'll mark this as bug, though one could argue it is a feature improvement.

image

It also counts the references incorrectly (there are two in my source file) and it won't allow a "normal" ident either. If we don't (or can't) support this, perhaps the error could be changed to "renaming operators is not supported"?

image