Closed dawedawe closed 10 months ago
It occurs to me that this (from my above comment) is a good test case for when the analyser should not trigger:
let asyncReturningFunc () =
do
use t1 = new blah
use t2 = new blah
()
async {
...
}
(similarly if we have a let
-binding rather than a do
)
In this case, it's clear and explicit that the disposables are disposed before the async is returned, let alone before it's run.
It occurs to me that this (from my above comment) is a good test case for when the analyser should not trigger:
Thanks, I added the
use
inside ado
as another negative test. Thelet
was already covered in another negative test.
We haven't got round to putting the analysers into the build pipeline for the service where this arose (I did one pass of fixing the analyser warnings, but I didn't merge the PR to add the analysers). I'm happy for us to get this into
main
and then enable the analysers on the pipeline and see in prod.