From ff06ceb6ec4916ac5bb06766a8be96eb75f50457 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 01:21:46 +0000 Subject: [PATCH 1/2] Add regression test for #14454: IAsyncDisposable use in task CE in FSI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Scripting/Interactive.fs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs index 7bca2ea2691..3f6155707f0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs +++ b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs @@ -358,3 +358,26 @@ asm.GetCustomAttributes(typeof, false) | Result.Error ex -> raise ex Assert.Equal(1, flags.Length) + + // https://github.com/dotnet/fsharp/issues/14454 + [] + let ``Issue 14454 - IAsyncDisposable use in task CE`` () = + Fsx + """ +open System +open System.Threading.Tasks + +let asyncDisposable = + { new IAsyncDisposable with + member _.DisposeAsync() = ValueTask() } + +let t = + task { + use d = asyncDisposable + return () + } + +t.Wait() + """ + |> eval + |> shouldSucceed From cb9db442ed7c59c25edeaeedc2ebcd3622c7a7d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 09:27:25 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Fix:=20use=20FactForNETCOREAPP=20=E2=80=94?= =?UTF-8?q?=20IAsyncDisposable=20unavailable=20on=20Desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IAsyncDisposable requires .NET Standard 2.1+ and is not available on .NET Framework Desktop, causing test failures in Desktop CI jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs index 3f6155707f0..cb797572366 100644 --- a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs +++ b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs @@ -360,7 +360,7 @@ asm.GetCustomAttributes(typeof, false) Assert.Equal(1, flags.Length) // https://github.com/dotnet/fsharp/issues/14454 - [] + [] let ``Issue 14454 - IAsyncDisposable use in task CE`` () = Fsx """