Description
Is your feature request related to a problem? Please describe.
I am a bit surprised that use _
(discard) is valid, like in this code:
// okay
use _ = { new IDisposable with member _.Dispose() = printfn "disposed" }
// ...
...whereas use! _
is invalid, like in this code:
// error FS1228: 'use!' bindings must be of the form 'use! <var> = <expr>'
async {
use! _ = Async.OnCancel (fun () -> printfn "disposed")
// ...
}
I am also not getting good results when googling FS1288.
Describe the solution you'd like
I expect to be able to use the discard "pattern" (?) in both cases.
Perhaps this is more complicated to implement than it looks like at first glance.
Describe alternatives you've considered
I am currently using __
(double _
), which is exactly what I used before use _
became valid code.
Additional context
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done