Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code-fix for _.Property / _.MethodCall() / _.IndexerAccess[idx] shorthand for accessor functions #1194

Open
4 tasks done
edgarfgp opened this issue Nov 6, 2023 · 0 comments · Fixed by #1251
Open
4 tasks done

Comments

@edgarfgp
Copy link
Contributor

edgarfgp commented Nov 6, 2023

Details

Now that dotnet/fsharp#13907 is merged would be good to have code-fix for this

// 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:

Checklist

  • I have looked through existing issues to make sure that this feature has not been requested before
  • I have provided a descriptive title for this issue
  • I am aware that even valid feature requests may be rejected if they do not align with the project's goals
  • I or my company would be willing to contribute this feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant