JetBrains / JetBrains/resharper-fsharp
Quick fix for removing _ when using a union case with not data
- Dominant language
- F#
- Stars
- 351
- Forks
- 55
- Avg merge
- 9h 38m
- Merged PRs (30d)
- 16
Description
I recently fixed https://github.com/dotnet/fsharp/issues/13851
- Fix https://github.com/dotnet/fsharp/pull/14055
```fsharp
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 :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the F# change in issue #13851 and pull request #14055, then trace how Rider handles the shown union-case patterns and the resulting diagnostic. Confirm whether the new warning reaches Rider and identify the existing quick-fix handling for similar pattern diagnostics. Done means the affected Rider experience is addressed for these examples, with the discard-removal quick fix behaving as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100