You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a CE we're reliant on methods per language construct (For/While/Using/etc) of which the compiler only recognizes a few signatures, today the compiler does not recognize IAsyncDisposable as a Using overload. There are some discussions to add support for it though
Yes, I'm familiar with how CE's work. However, I don't believe you need language support for IAsyncDisposables. A let! or match! operates on a M<'a> and unwraps the 'a which, in this case, is a task that must be awaited to get the 'a inside. In the case of IAsyncDisposable, the result is available at assignment time and there is no waiting involved. The waiting must happen within the finally function in a tryFinally. This is quite possible to achieve without language support I believe (though the code will be somewhat convoluted). There's already an example of how to do this at fsharp/fslang-suggestions#866.
Are there any plans to support the new IAsyncDisposable?
The text was updated successfully, but these errors were encountered: