JetBrains / resharper-fsharp

F# support in JetBrains Rider
Apache License 2.0
328 stars 53 forks source link

Quick fix for removing _ when using a union case with not data #428

Open edgarfgp opened 1 year ago

edgarfgp commented 1 year ago

I recently fixed https://github.com/dotnet/fsharp/issues/13851

type X = X

 let x: X = X

 let myVal =
     match x with
     | X _ -> ()

let myFunc(X x) = 5+5
 let myDiscardedArgFunc(X _)

This will not longer be valid and a new warning error will be reported : Pattern discard is not allowed for union case that takes no data.

Will Rider be affected by this change ?

Update : Im Rider user and I would love to contribute with some guidance to how to add a quick fix :)

edgarfgp commented 1 year ago

@auduchinok Looks like this warning is now available on the EAP 8. and a code fix has been implemented in VS https://github.com/dotnet/fsharp/pull/14267. Will this also be added for Rider 2022.3 stable?

auduchinok commented 1 year ago

Update : Im Rider user and I would love to contribute with some guidance to how to add a quick fix :)

Great, let's have a chat on Slack? 🙂

edgarfgp commented 1 year ago

Great, let's have a chat on Slack. ? 🙂

Sure