FsAutoComplete
FsAutoComplete copied to clipboard
Code-fix for _.Property / _.MethodCall() / _.IndexerAccess[idx] shorthand for accessor functions
Details
Now that https://github.com/dotnet/fsharp/pull/13907 is merged would be good to have code-fix for this
-
From
fun x -> x.Foo
to_.Foo
and maybe the other way around too ?
// From
let a5 : {| Foo : int -> {| X : string |} |} -> string = fun x -> x.Foo(5).X
// To
let a5 : {| Foo : int -> {| X : string |} |} -> string = _.Foo(5).X
// From
let a6 = [1] |> List.map(fun x -> x.ToString())
// To
let a6 = [1] |> List.map _.ToString()
Note:
- https://github.com/fsharp/FsAutoComplete/pull/1180 needs to me merged first to work on this.
- Branching off of nightly could also be the way to go to work on that codefix at the moment
Checklist
- [X] I have looked through existing issues to make sure that this feature has not been requested before
- [X] I have provided a descriptive title for this issue
- [X] I am aware that even valid feature requests may be rejected if they do not align with the project's goals
- [X] I or my company would be willing to contribute this feature