A code refactoring to deinterpol a string
Open
Area-LangService-CodeRefactorings
Feature Request
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Suggested by @T-Gro
Basically it could fix the following cases:
```fsharp
let x = $"test"
let y = $"{x}"
```
Interpolation is useless here - it decreases readability and in the second case has small perf penalty. Change the code to:
```fsharp
let x = "test"
let y = x
```
Note, $"test" compiles to the "test" so it might be not worth running a code ref in the background for this case.
Contributor guide
Assessment
This issue has not been assessed yet.