-
Notifications
You must be signed in to change notification settings - Fork 805
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
New codefix provider to remove superflous binding for a Union case that has 0 fields. #14267
New codefix provider to remove superflous binding for a Union case that has 0 fields. #14267
Conversation
/run fantomas |
Failed to run fantomas: https://github.com/dotnet/fsharp/actions/runs/3419732464 |
Huh, interesting that it failed to run fantomas. Need to check what's up with it |
@T-Gro This looks awesome . |
fsharp/fslang-suggestions#1094 would be a godsend in cases like this. |
Oh yes, the relevant part of the tree when spotting a diagnostic (since it is available "at hand") could directly flow with it. |
@T-Gro While I was adding the same quick fix for Rider. I notice that we can also use the same quick fix for type E =
| A = 1
| B = 2
let (E.A x) = E.A
match E.A with
| E.A x -> ()
let [<Literal>] A = 1
match 1 with
| (A x) -> () See JetBrains/resharper-fsharp#444 for more info |
This kicks in when:
This builds on top of the new diagnostics added via #14055
CodeFixRemoveSuperflousBinding.mp4