Skip to content

Commit 3149b48

Browse files
authored
Don't quote generic type parameters on rename (#6491)
1 parent b5d0ab6 commit 3149b48

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ type internal InlineRenameLocationSet(locations: InlineRenameLocation [], origin
5353

5454
async {
5555
let! newSolution = applyChanges originalSolution (locations |> Array.toList |> List.groupBy (fun x -> x.Document))
56+
let replacementText =
57+
match symbolKind with
58+
| LexerSymbolKind.GenericTypeParameter
59+
| LexerSymbolKind.StaticallyResolvedTypeParameter -> replacementText
60+
| _ -> Lexhelp.Keywords.NormalizeIdentifierBackticks replacementText
5661
return
5762
{ new IInlineRenameReplacementInfo with
5863
member __.NewSolution = newSolution
@@ -94,7 +99,7 @@ type internal InlineRenameInfo
9499
member __.DisplayName = symbolUse.Symbol.DisplayName
95100
member __.FullDisplayName = try symbolUse.Symbol.FullName with _ -> symbolUse.Symbol.DisplayName
96101
member __.Glyph = Glyph.MethodPublic
97-
member __.GetFinalSymbolName replacementText = Lexhelp.Keywords.NormalizeIdentifierBackticks replacementText
102+
member __.GetFinalSymbolName replacementText = replacementText
98103

99104
member __.GetReferenceEditSpan(location, cancellationToken) =
100105
let text = getDocumentText location.Document cancellationToken

0 commit comments

Comments
 (0)